Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I debug?

When I was about to debug C++ program in VS2005,the program didn't stop at the breakpoints.

The VS said"No symbols are loaded for any call stack frame. The source code cannot be displayed".

What can I do?

like image 719
MainID Avatar asked Feb 12 '09 08:02

MainID


People also ask

Why is my breakpoint not working?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

What is a debugging error?

In computer terms, debugging means to get rid of errors. The term comes from the early days of computers when a moth (a literal bug) got caught in a computer causing it to not work properly.


1 Answers

Thanks to everybody.

Finally,I found a solution here.

To enable debugging:

1) Goto Project->HelloWorld Properties

2) On the left expand "Configuration Properties"

3) Expand "C/C++"

4) On the left, Select "General"

5) On the right, change "Debug Information Format" to "Program Database For Edit And Continue (/ZI)"

5) On the left, Select "Optimization"

6) On the right, change "Optimization" to "Disabled (/Od)"

7) On the left, expand "Linker"

8) On the left, select "Debugging"

9) On the right, change "Generate Debug Info" to "Yes"

10) Click ok

11) Set your breakpoints

12) Rebuild your application

Also when running your application use Ctrl+F5 to build and run it, this keeps the console window open long enough for you to see your output.

like image 77
MainID Avatar answered Sep 27 '22 20:09

MainID