Click here to Skip to main content
13,556,208 members
Rate this:
Please Sign up or sign in to vote.
See more:
how to trace & debug my C# & java programs please tell me the steps involved in it?
Posted 12-Sep-12 3:09am
User-3642095 12-Sep-12 9:18am
Do you have Visual Studio installed?
Wes-Aday 12-Sep-12 9:20am
Okaaaaaaay..... I know this is going to come as a shocking answer.... use a debugger.....
ManfredRBihy 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

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:
OriginalGriff 12-Sep-12 9:42am
You can't use interrupt driven serial ports for serious debugging - the interrupt handler can change the status of the processor. To get a realistic picture you need to poll, or ensure that the internal buffer of the SIO device is big enough to hold the whole output. :)
Malli_S 12-Sep-12 9:29am
Agreed ! :P
Wes-Aday 12-Sep-12 9:30am
I hate to disagree... but a real man would just use a pen (pencils are for sissys) and paper (cocktail napkin) to bench check everything.... :-) Who the heck wants to read log files? lol
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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:[^] and you might get the basics.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180515.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100