By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,165 Members | 1,508 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,165 IT Pros & Developers. It's quick & easy.

Debug.WriteLine crashes

P: n/a
I noticed the other day when starting a console application in VB.NET that
when using System.Diagnostics.Debug.WriteLine(x.ToString()) where x is a
function call (that returns a value that can be represented as string) it
crashes. It's as if an exception is going to be thrown, but one never is,
both VS.NET and the program just hang. If I put as the very first line of the
program Debug.WriteLine("yo") then it doesn't do it, everythinig works fine.
It's as if Debug.WriteLine has to 'warm up' before it can do anything
complex, which of course I know not to be the case, but I wonder what it
could be? Has anyone else ever noticed this?
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Bonj,

Did you already tried what it did with this?

messagebox.show(x.ToString())

Assuming it is a windowforms application

Cor
"Bonj" <Bo**@discussions.microsoft.com>
I noticed the other day when starting a console application in VB.NET that
when using System.Diagnostics.Debug.WriteLine(x.ToString()) where x is a
function call (that returns a value that can be represented as string) it
crashes. It's as if an exception is going to be thrown, but one never is,
both VS.NET and the program just hang. If I put as the very first line of
the
program Debug.WriteLine("yo") then it doesn't do it, everythinig works
fine.
It's as if Debug.WriteLine has to 'warm up' before it can do anything
complex, which of course I know not to be the case, but I wonder what it
could be? Has anyone else ever noticed this?

Nov 21 '05 #2

P: n/a
This doesn't solve the problem.
It was a console application, not windows forms.

"Bonj" wrote:
I noticed the other day when starting a console application in VB.NET that
when using System.Diagnostics.Debug.WriteLine(x.ToString()) where x is a
function call (that returns a value that can be represented as string) it
crashes. It's as if an exception is going to be thrown, but one never is,
both VS.NET and the program just hang. If I put as the very first line of the
program Debug.WriteLine("yo") then it doesn't do it, everythinig works fine.
It's as if Debug.WriteLine has to 'warm up' before it can do anything
complex, which of course I know not to be the case, but I wonder what it
could be? Has anyone else ever noticed this?

Nov 21 '05 #3

P: n/a
You should still be able to reference the msgbox function if you add the proper references.
"Bonj" <Bo**@discussions.microsoft.com> wrote in message news:59**********************************@microsof t.com...
This doesn't solve the problem.
It was a console application, not windows forms.

"Bonj" wrote:
I noticed the other day when starting a console application in VB.NET that
when using System.Diagnostics.Debug.WriteLine(x.ToString()) where x is a
function call (that returns a value that can be represented as string) it
crashes. It's as if an exception is going to be thrown, but one never is,
both VS.NET and the program just hang. If I put as the very first line of the
program Debug.WriteLine("yo") then it doesn't do it, everythinig works fine.
It's as if Debug.WriteLine has to 'warm up' before it can do anything
complex, which of course I know not to be the case, but I wonder what it
could be? Has anyone else ever noticed this?

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.