Forum C# Debug.WriteLine

Debug.WriteLine

Postby mfranzs » August 1st, 2011, 12:00 am

Hey:

Is it possible to whitelist Debug.WriteLine?

I have a debugging script that I run when I'm away from my computer. When it encounters an error, it closes the room. Then the dev server deletes the Console.WriteLine output four minutes later -.-

This would be really helpful, thanks!
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby Benjaminsen » August 1st, 2011, 7:52 pm

You can use the http://playerio.com/documentation/refer ... y.errorlog API to dump errors directly to the online Errorlog.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Debug.WriteLine

Postby mfranzs » August 2nd, 2011, 2:35 am

Great thanks!

I brought this up because i began getting MDA errors again... :(
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby mfranzs » August 4th, 2011, 3:13 am

Hmm.

When I use

Code: Select all
ErrorLog.WriteError("Test.");



I get

Error 3 An object reference is required for the non-static field, method, or property 'PlayerIO.GameLibrary.ErrorLog.WriteError(string)' Gamelocationhere\Serverside Code\Game Code\Game.cs 2158 33 Game Code.VS2010



Any suggestions? Thnkx
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby mfranzs » August 5th, 2011, 1:29 am

BTW: I forgot to add this.

If i define

Code: Select all
ErrorLog e = new ErrorLog();


I get this error.

Error 3 Cannot create an instance of the abstract class or interface 'PlayerIO.GameLibrary.ErrorLog' C:\Users\Martin\Dropbox\multiplayer_experiments\Jetpack4\Serverside Code\Game Code\Game.cs 175 26 Game Code.VS2010


HELP PLEASE!
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby Oliver » August 5th, 2011, 10:04 pm

You can only access the errorlog through the preconfigured instance in a serverside game room:

Code: Select all
GotMessage(...){
   PlayerIO.ErrorLog.Write....
}


- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Debug.WriteLine

Postby mfranzs » August 5th, 2011, 10:14 pm

Thanks, this works!

But, it still outputs TO THE CONSOLE, not to the c# debug output line.

Any suggestions?

Thanks!
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby mfranzs » August 7th, 2011, 10:59 pm

Sorry to be annoying about this... but this is totally stopping development.

Does anyone have any tips? :/
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby Oliver » August 11th, 2011, 7:28 pm

Anything you write to the console will be mirrored to Debug output in the next development server.

Release timeline: very soon.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Debug.WriteLine

Postby mfranzs » August 12th, 2011, 1:30 am

O_O

You guys rock!

Thanks :D

(soon = a few days? :o)
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby mfranzs » August 13th, 2011, 4:56 pm

Hey!

So, I downloaded the update today. But, it doesn't seem to be working as intended. Where am I supposed to see the duplicated
Debug.WriteLine text? My output panel isn't showing under either Debug or build...

As well, does this update allow us to ONLY write to Debug.WriteLine? Because whenever I generate a lot of text to send to Console.WriteLine, the server ALWAYS crashes.

Thanks!
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby Oliver » August 29th, 2011, 2:34 am

Hey,

Sorry for the late reply. You're absolutely right, for some reason it does not work in our release build. I'll get an engineer to look at it for the next release.

Right now, it just mirrors output written to console, but one of the recent versions did some changes to allow for more output without crashing. Does the latest version crash for you now when you write a ton of text to the output panel?

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Debug.WriteLine

Postby mfranzs » September 3rd, 2011, 9:56 pm

Hey: The problem still persists when I write a ton of output.

Has there been any update on this?

Thanks!
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby Oliver » September 6th, 2011, 7:42 pm

It works in our internal "Write a ton of data"-test case.

Perhaps you can send me the project with a (simple) way of reproducing the problem? Then we can get a developer to figure out and fix the problem.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Debug.WriteLine

Postby mfranzs » September 6th, 2011, 8:18 pm

Hey- I just updated to the latest version, thanks for fixing the problem!

I'll get back to you in a day or so once I put together an example... thanks for being so responsive and helpful!

(PS: Are the instructions for upgrading on the website anywhere? Because they go away once you download the updated folder, and its hard to remember which to switch. I do realize that I should just copy the instructions into notepad, but I always forget :()
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby Oliver » September 6th, 2011, 8:30 pm

Hey,

Thanks. The instructions are here: http://playerio.com/developmentserver/currentversion

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Debug.WriteLine

Postby mfranzs » September 6th, 2011, 10:59 pm

Hey Oliver, thanks for your help!

What's your email so I can send the file? :P
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby Oliver » September 6th, 2011, 11:02 pm

Sent you a PM.
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Debug.WriteLine

Postby mfranzs » September 7th, 2011, 2:30 am

Thanks!

NewGame.zip contains an executable file. For security reasons, Gmail does not allow you to send this type of file.


I sent a dropbox link to you, please tell me if you don't get it, and I shall re-download it.

Thanks again! ^_^
~mfranzs
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby Oliver » September 7th, 2011, 5:38 am

Should be fixed in newest development server.

- Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Debug.WriteLine

Postby mfranzs » September 7th, 2011, 8:39 pm

Hey:

I just downloaded the updated folder, and saw that it was working much smoother.

But, when I attempted to add more users ( and therefore increase the debug output ), the server crashed again.

For each user I am outputting:
1000/60 MS Break=16 loops per second = 16 total
100 lines of output per user = 1600 total
5 users (and I want to add many more) = 8000+ per second

Can you just PLEASE whitelist Debug.WriteLine? It appears to me that this would be a lot easier than continuing to try to optimize the console output...

Thanks,
~mfranzs
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby azuanagames » September 10th, 2011, 2:31 am

Just use the mode where everything is whitelisted?
azuanagames
 
Posts: 157
Joined: April 29th, 2010, 10:59 pm

Re: Debug.WriteLine

Postby mfranzs » September 10th, 2011, 3:24 am

O_O
How do you turn this on?!?!?!

Thanks O_O
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby FulaFisken » September 10th, 2011, 3:07 pm

azuanagames wrote:Just use the mode where everything is whitelisted?


What have I missed here? :o
Fula Fisken
website blog twitter
Play Game
Astroflux
User avatar
FulaFisken
Paid Member
 
Posts: 139
Joined: March 2nd, 2011, 10:15 am

Re: Debug.WriteLine

Postby azuanagames » September 10th, 2011, 7:55 pm

It's on the development server only obviously...

I'm not sure how to turn it on. It was in one of the release notes from the previous release.
azuanagames
 
Posts: 157
Joined: April 29th, 2010, 10:59 pm

Re: Debug.WriteLine

Postby mfranzs » September 11th, 2011, 3:00 am

Is it this?

Ability to disable codescanning in the development server only
Just add <add key="DisableCodeScan" value="true" /> to the App.config of the development server project


If so, how do you find the App.config file?... I looked but cant find it anywhere. Thanks ^_^
mfranzs
 
Posts: 98
Joined: August 29th, 2010, 3:27 am

Re: Debug.WriteLine

Postby Oliver » September 20th, 2011, 2:07 pm

You have to add an App.config file to the development server test project yourself. Just right click the project and click "add..." to add it :-)

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to C#