|
-
Jun 15th, 2005, 02:24 PM
#1
Thread Starter
Hyperactive Member
debug watching
Is there (there has to be!) a way to print to the immediate window like VB's debug.print statement?
Also, in VB you could breakpoint then type (in the immediate window) a function and it would print the function's output, like now(). In C# it will print properties, but won't execute functions. Why?
IE
>? string.length
10
>? string.ToStrin()
error
-
Jun 15th, 2005, 03:39 PM
#2
Re: debug watching
System.diagnostics.debug.writeline 
it should print out hte values. HOWEVER if you reference some function without the () it will just spit out the function name, (ie, do .ToString() not ToString )
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jun 15th, 2005, 05:37 PM
#3
Frenzied Member
Re: debug watching
doesn't Console.Writeline() do the same?
-
Jun 16th, 2005, 12:09 AM
#4
Re: debug watching
The Immediate window has two modes: immediate and command (I think). I used to know how to switch between the two but I haven't used it in so long I can't remember. I'm sure a quick help search would turn up something. I know it's very simple, like entering a few characters. I believe the second mode would allow you to execute functions. Also, you can use the Watch window to evaluate pretty much anything that is valid for the current context.
-
Jun 16th, 2005, 12:44 AM
#5
Re: debug watching
 Originally Posted by Andy
doesn't Console.Writeline() do the same?
umm Console is supposed to write on the console window (like if you have a Console project then you should use that). and Debug is supposed to control the debugger window, I think
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jun 16th, 2005, 08:11 AM
#6
Frenzied Member
Re: debug watching
yeah, that makes sense..in VB, i always use Console.Writeline for debugging...maybe i should reconsider my tactics
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|