-
March 23rd, 2010, 11:12 PM
#1
Debugging for beginner
Hi !
I am taking my second C++ course, and with all honesty I can tell you that my debugging skills are as following: press "Build Solution" and then press "Start without debugging", and god mercy on my soul.....if there is a serious mistake, I am f@#$, I don't even know how to use breakpoints.
Any literature, any links would be a great help !!!
Thanks !
-
March 24th, 2010, 12:19 AM
#2
Re: Debugging for beginner
It's not that hard. First set some breakpoints in your code by putting the cursor on a line of code and then press F9 (notice how the red dot appears to the left of the code).
Then press F5 to start debugging.
When the break point gets hit, press F11 to step into the method or F10 to step over.
Try it out on a simple Win32 console app.
-
March 24th, 2010, 04:50 AM
#3
Re: Debugging for beginner
Debugger faq. Maybe it helps.
-
March 24th, 2010, 08:58 AM
#4
Re: Debugging for beginner
@alexibm
That was a hilarious post but on a serious note such has been the scene in my case too.
Currently I am somewhat comfortable with debugging, but the question I would like to put forth is here:
The .exe file that I have created accesses an image file. Luckily the current compilation works and I get the desired result. But I am not able to get results when I debug.
I guess that's so because, while debugging the image file is not accessible to the debugger. Where should I copy the image file so that even while debugging I get the same result? In the case of the compiled .exe file, the image files sits right besides the .exe.
-
March 24th, 2010, 10:57 AM
#5
Re: Debugging for beginner
Originally Posted by sgsawant
Where should I copy the image file so that even while debugging I get the same result?
Copy it to the output folder. You can do this in a post build step.
-
March 24th, 2010, 11:06 AM
#6
Re: Debugging for beginner
You can modify the program's default working directory to be whatever you like in the project properties.
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
|