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
 
Thanks to all who took the time to reply - it's sorted now.

Thanks,
Gordon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top