Click here to Skip to main content
15,889,751 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my code base of C++ the breakpoints are not hitting up.
I have built a code base(C++ on Windows) in visual studio and created a dll and its corresponding pdb files.

I ran the application and then connected it to windbg, set the symbols properly and source code path is also proper.
I have set the breakpoints in a suspected file.
The problem is the breakpoints are not hitting up.
When I make the changes at that place(where I have set the breakpoints) the corresponding changes gets reflected in the output.
But while running the application the breakpoints does not hit.

What might be the reason behind this and how to resolve it?
Posted
v2

Make sure that you've compiled the binaries in 'Debug' mode.
Secondly check whether the debugger is loading the right symbols / pdbs from the right path.
For more details you can have a look this[^].
 
Share this answer
 
1. Open your DLL project
2. Open the properties page, then go to 'Debugging' and in the field 'Command', enter the (relative) path and name of the application.
3. press F5 to build and run your DLL in debug mode

If that doesn't work, check the output window for error messages during startup.
 
Share this answer
 
According to this[^] similar question at SO, it may be because you have some optimizations turned on. When it optimizes, sometimes the code where the breakpoint is set no longer exists. Try turning off all optimization.
 
Share this answer
 
lets check on the basic requirmenet first!
pls check ur application runs in debug mode!

If its fine, use some message boxes along the control so that you get a easy solution what has gone wrong!
 
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