473,394 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

DEBUG Problems

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.
Nov 20 '05 #1
4 1623
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
"Gordon" <gh*********@btconnect.nospam> wrote in message
news:bq**********@sparta.btinternet.com...
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.

Nov 20 '05 #2
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 Ryan wrote:
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
"Gordon" <gh*********@btconnect.nospam> wrote in message
news:bq**********@sparta.btinternet.com...
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.


Best Regards - OHMBest Regards - OHM On**********@BTInternet.Com
Nov 20 '05 #3
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
-----Original Message-----
Hi,

Can anybody explain to me why

system.diagnostics.debug.writeline

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

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 shouldwork all the time. Or am I missing something ?

Gordon.
.

Nov 20 '05 #4
Thanks to all who took the time to reply - it's sorted now.

Thanks,
Gordon.

"Gordon" <gh*********@btconnect.nospam> wrote in message
news:bq**********@sparta.btinternet.com...
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.

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: PJ | last post by:
I'm at the end of my rope, I've tried everything I can think of and, while the problem is all over google, no answer has worked for me. I'm getting the following error while trying to start my web...
6
by: Peter Afonin | last post by:
Hello: I'm running Windows server 2003. I've never had any problems with debugging, but now I cannot debug ANY of my projects. I'm getting this error: "Error while trying to run project:...
4
by: Michael Augustine | last post by:
I am having problems debugging an Web form app in .net. I am getting the following error message "Unable to Start Debugging on the Webserver. Catostrophic Failure." I think the problem has to...
1
by: Oney | last post by:
I began to use Windows 2003 server for a short time. Whenever I try to open an ASP.NET Application and debug ASP.NET Application it returns errors. I didn't have problems like that when I was using...
2
by: njr | last post by:
Having copied a number of folders from my development PC (XP) to a development server (W2003) and installed them under wwwroot (and created applications in IIS) I have problems when I include the...
7
by: AC [MVP MCMS] | last post by:
Wierd situation here. Running ASP.NET 1.1 on Win2003. I have to manually attach the debugger to a process in order to debug. So I set a breakpoint in an obvious place (like within the Page.Load...
11
by: serge | last post by:
When i debug a trigger is it possible to add a WATCH on the INSERTED or DELETED? I think not, at least I couldn't figure out a way to do so. Does someone have a suggestion on how I can see the...
11
by: AG | last post by:
Hi all, New install of VS 2005 Pro (SP1) on new machine with Windows XP Pro SP2, Core 2 Extreme Quad Core processor, 4GB RAM. Trying to debug a Web Application Project. I had no problems...
2
by: Dave Johansen | last post by:
I just converted a solution from Visual Studio 2003 to Visual Studio 2005 and the Debug mode seems to be running just fine, but the Release mode crashes on the following code: std::ifstream...
3
by: =?Utf-8?B?bG10dGFn?= | last post by:
We have developed a number of different applications (ASP.NET web site, Windows services, DLLs, Windows forms, etc.) in C# 2.0. We have developed and unit tested all these applications/components...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.