views:

54

answers:

3

Possible Duplicate: Break point issue

I am unable to put a breakpoint.

I am getting the message in the breakpoint like:

"break point will not be currently hit, no symbols are loaded"

+2  A: 

there are a few solutions. The problem is that the symbols loaded dont match the executable.

1) Make sure the exe you are attached to have its PDB's in the same directory and its the same version

2) make sure your source code is the same version as well

3) when debugging , open the modules window (debug --> windows-->modules). Choose load symbols and choose your pdb

If your unsure on what to do, then rebuild everything and run

oooops . i didnt read your post properly, i assumed your using visual studio. Anyway, if your not , just find where in your IDE you need to set the symbols and check there.

Andrew Keith
+1  A: 

Another issue is that the breakpoint is that it may be set to a blank line.

monksy
most IDE's will detect this and move the breakpoint to the next available line instead of being disabled.
Andrew Keith
Most IDEs try to detect this. But I've found this to happen occationally in Netbeans [latest] and VS.net [up to and including 2005, no experience with 08 yet]
monksy
A: 

Sometimes if I have another instance of Visual Studio open as well as the one I'm trying to debug with, it plays up, especially if I've been debugging in that other one.

Rafe Lavelle
its because your not connected to the correct instance of the application. You can only use 1 debugger per instance of an executable. To use a second, you need to detach first.
Andrew Keith
how to know instance of application
peter