DEBUG Problems

  • Thread starter Thread starter Gordon
  • Start date Start date
G

Gordon

Hi,

Can anybody explain to me why

system.diagnostics.debug.writeline

produces nothing in some programs and produces the desired output in other
programs.

I am using VB.NET (from Visual Studio .NET) running under WIndows XP Pro.

I always include system.diagnostics as an import, so in theory it should
work all the time. Or am I missing something ?

Gordon.
 
Are you switching the Build type to Release or is it always debug? Release
ignores the debug symbols (although that code is still compiled in with the
..exe).

HTH,

Bill
 
Sounds like the most plausable scenario to me.

How ya doin Bill, long time no see !

Regards - OHM ( Former author of Keep.NET and Fish.NET )
;-)


William said:
Are you switching the Build type to Release or is it always debug?
Release ignores the debug symbols (although that code is still
compiled in with the .exe).

HTH,

Bill

Best Regards - OHMBest Regards - OHM (e-mail address removed)
 
Hi,

I would do this :

Imports System.Diagnostics

Private TxtWriter as TextWriterTraceListener


In Form_Load event, add this code :

TxtWriter = new TextWriterTraceListener
(System.Console.Out)

Debug.Listeners.Add(TxtWriter)

Debug.WriteLine("Printing error message.....")

regards

MadGun
 
Back
Top