Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
See more:
how to trace & debug my C# & java programs please tell me the steps involved in it?
Posted
Comments
bbirajdar 12-Sep-12 9:18am    
Do you have Visual Studio installed?
[no name] 12-Sep-12 9:20am    
Okaaaaaaay..... I know this is going to come as a shocking answer.... use a debugger.....
Manfred Rudolf Bihy 12-Sep-12 9:25am    
Wes, Wes, Wes :sadheadshake:! Debuggers are for wusses. Real men sprinkle their code with logging statements at a rate of about 50\50 and then analyze the logfiles. :D

:P
OriginalGriff 12-Sep-12 9:28am    
Hah! Logfiles are for softies! Real men add assembly level register printing to serial output and analyse it in real time! :laugh:
Malli_S 12-Sep-12 9:29am    
lol ! Did you miss the interrupts ? :laugh:

 
Share this answer
 
Ignoring the Java side - I don't use it, so I can't comment (but it won't be very different) the debugger is built into VS.

When you run your program with the F5 key, it attaches a debugger to the application, and allows you to do an enormous range of things, from the basic "add a breakpoint" (which stops your program running when it reached a specified line of code) to viewing an amending variable values and single stepping through the code to follow exactly what is going on.

How to do it? Run the program, and use the "Debug" menu to select what you want to do.

We can't give you a full explanation, there is too much there. But start reading here: http://msdn.microsoft.com/en-us/library/sc65sadd.aspx[^] and you might get the basics.
 
Share this answer
 
No need to ignore the Java side!

Debugging etc. is included If you use a decent IDE like Eclipse or Netbeans.
Both are FREE and one of them should be used by every one developing software in Java.

You can actually also develop software in C# with Eclipse.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900