Break point not hit error in VS2005
-
Not able to debug my project it is shown as 'The breakpoint will not currently be hit.No symbols have been loaded for this document.'The break point is shown as an error symbol.Along with it showing another project's function name.I am using VC2005.How to solve this?
-
Not able to debug my project it is shown as 'The breakpoint will not currently be hit.No symbols have been loaded for this document.'The break point is shown as an error symbol.Along with it showing another project's function name.I am using VC2005.How to solve this?
- Are you sure the location where you are placing a breakpoint is in the relevant project and not a dll that it depends on? 2) Have you compiled your add-in(s) recently and made sure the latest version in your path match the versions that you just compiled. 3) Do you have debug information enabled?
-
- Are you sure the location where you are placing a breakpoint is in the relevant project and not a dll that it depends on? 2) Have you compiled your add-in(s) recently and made sure the latest version in your path match the versions that you just compiled. 3) Do you have debug information enabled?
-
Thank you...Yes they are set..but the issue is still there.Earlier i had removed the .obj files from the debug folder..cleaned and rebuild the whole project after that this problem is occurring.
-
I understand that the breakpoints are set; this is a common problem most often due to #1 - 3 I mentioned before. Does your program rely on any dlls? Is it an exe or dll supporting excel for instance?
-
It is an exe..yes it is relaying some dlls and i had placed a breakpoint is in the relevant project itself...but not working.
-
Not able to debug my project it is shown as 'The breakpoint will not currently be hit.No symbols have been loaded for this document.'The break point is shown as an error symbol.Along with it showing another project's function name.I am using VC2005.How to solve this?
A bit hard to say without seeing the code. If none of the previous suggestions helped: Have you checked that the code you want to look at is in fact not dead - as in, the control flow can actually reach it? Maybe the code is inaccessible. Or you tried to set the breakpoint in a function that is no longer used, or has been replaced by another function. Check your code for locations that call the function you're interested in and try setting your breakpoint there. If that works, step into the function call from there. If not then maybe repeat to get to the next higher level in the call hierarchy. On a sidenote, what language is it? In C/C++, setting a breakpoint within makro definitions might not work at all, since to the compiler this is technically just plain text. Also breakpoints in templated functions can occasionally be tricky, although I haven't encountered any problems for a long time.
-
A bit hard to say without seeing the code. If none of the previous suggestions helped: Have you checked that the code you want to look at is in fact not dead - as in, the control flow can actually reach it? Maybe the code is inaccessible. Or you tried to set the breakpoint in a function that is no longer used, or has been replaced by another function. Check your code for locations that call the function you're interested in and try setting your breakpoint there. If that works, step into the function call from there. If not then maybe repeat to get to the next higher level in the call hierarchy. On a sidenote, what language is it? In C/C++, setting a breakpoint within makro definitions might not work at all, since to the compiler this is technically just plain text. Also breakpoints in templated functions can occasionally be tricky, although I haven't encountered any problems for a long time.
Thank you...the function that has been put break point is still used..debugging was working fine until i cleaned and rebuild the project & also deleted .obj files.The language is VC++ with some C++ also used in coding and working on VS2005...now i had attached to script and trying to debug but the control is not coming to the break point..only the break point not hit that error is removed...i mean the symbol showing error is not coming now.
-
Thank you...the function that has been put break point is still used..debugging was working fine until i cleaned and rebuild the project & also deleted .obj files.The language is VC++ with some C++ also used in coding and working on VS2005...now i had attached to script and trying to debug but the control is not coming to the break point..only the break point not hit that error is removed...i mean the symbol showing error is not coming now.
Jia100 wrote:
rebuild the project & also deleted .obj files
I am assuming you first deleted the obj files and then rebuilt the project, not the other way round? Just trying to make sure, because if the object files no longer exist, the application will still run, but the debugger might not be able to recognize how the binary executable is linked to the source code! Which would explain what the debugger meant by 'No symbols have been loaded for this document.'... Not sure what else to suggest, other than checking the messages being sent to output during startup: look if there are similar messages denoting symbol files that are not being loaded, and for which modules. One more idea: is the function you want to debug being called externally? If so, have you checked whether it's properly declared as external?
-
Jia100 wrote:
rebuild the project & also deleted .obj files
I am assuming you first deleted the obj files and then rebuilt the project, not the other way round? Just trying to make sure, because if the object files no longer exist, the application will still run, but the debugger might not be able to recognize how the binary executable is linked to the source code! Which would explain what the debugger meant by 'No symbols have been loaded for this document.'... Not sure what else to suggest, other than checking the messages being sent to output during startup: look if there are similar messages denoting symbol files that are not being loaded, and for which modules. One more idea: is the function you want to debug being called externally? If so, have you checked whether it's properly declared as external?
-
Stefan63 wrote: first deleted the obj files and then rebuilt the project Yes done like that...not in any function breakpoints are working..same issue everywhere...
You mentioned an error message, namely that 'the symbols for this document were not loaded' or something like that. This indicates one of the following: 1. No debugging/symbolic information was generated --> check the compiler settings of your project, and/or specifically for this file to see if debugging information is being generated (Properties -> C/C++ -> General -> Debug information format). You need 'Program Database' or 'Program Database for Edit and Continue. Everything else will not allow the use of breakpoints 2. The debugging information could not be found --> check the ouput folder to see if the *.pdb file (program database) is present for your project. It contains the symbolic information needed to interpret and use breakpoints. Specifically check the settings for your output files (Properties -> C/C++ -> Output files), whether the folder indicated there is still correct. 3. You're trying to set breakpoints within code that is not part of your project (e.g. code that is part of a DLL that your project uses), and that code has not been generated with debug/symbolic information. In that case rebuilding your project won't help. 4. You're trying to set breakpoints within code that is not part of your project (e.g. code that is part of a DLL that your project uses), and that code has been generated with debug/symbolic information, but the program database for this DLL is not accessible. This can happen if you copied the DLL to another folder so the EXE can access it, but forgot to copy the PDB file as well, which contains the symbolic information.