Forum C# Console.WriteLn() invisible during exception

Console.WriteLn() invisible during exception

Postby wildbunny » March 17th, 2011, 12:45 pm

Hi guys,

Any way you can just allow Debug.WriteLn() instead of forcing us to use Console.WriteLn()? The reason is, when an exception occurs, the entire development server window goes blank due to the way that windows refreshes stuff...

If it debug text was output to the output window as normal, we'd be able to see the text :)

Cheers, Paul.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am

Re: Console.WriteLn() invisible during exception

Postby Oliver » March 18th, 2011, 11:36 am

Hey,

The entire development server window is not supposed to go blank? It should just print out the exception... doesn't it do that?

Or do you mean that the IDE goes into debug-mode so you can inspect variables?

I looked a bit into the Debug class and i don't think we'll allow it in the whitelist, since it does some things internally we don't want to open up for.

One idea might be to mirror all Console.Writeline output to Debug.Writeline when your game is running in the development server... what do you think about that?

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

Re: Console.WriteLn() invisible during exception

Postby wildbunny » March 18th, 2011, 11:57 am

Oliver wrote:Hey,

The entire development server window is not supposed to go blank? It should just print out the exception... doesn't it do that?

Or do you mean that the IDE goes into debug-mode so you can inspect variables?


The ide goes into debug mode, so the app which refreshes the console window stops running, the window gets covered up and then the contents is erased making it impossible to read any debug messages or to see any rendered debug images...

I looked a bit into the Debug class and i don't think we'll allow it in the whitelist, since it does some things internally we don't want to open up for.

One idea might be to mirror all Console.Writeline output to Debug.Writeline when your game is running in the development server... what do you think about that?

- Oliver


I'm really surprised that you haven't needed to use Debug.Assert or Debug.Writeln before; they are two of the most fundamental tools available to .net developers - by not allowing their use it makes developers live so much harder...

But if you really must disallow it, then yes if its possible to redirect the console output through debug.writeln so we can see it, that would be much appreciated :)

Cheers, Paul.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am

Re: Console.WriteLn() invisible during exception

Postby Oliver » March 21st, 2011, 5:22 am

Aiight, added it to the todo, will appear soon.

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


Return to C#



cron