Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Break point not hit error in VS2005

Break point not hit error in VS2005

Scheduled Pinned Locked Moved C / C++ / MFC
debugginghelptutorialquestion
11 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jia100
    wrote on last edited by
    #1

    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?

    T S 2 Replies Last reply
    0
    • J Jia100

      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?

      T Offline
      T Offline
      T2102
      wrote on last edited by
      #2
      1. 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?
      J 1 Reply Last reply
      0
      • T T2102
        1. 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?
        J Offline
        J Offline
        Jia100
        wrote on last edited by
        #3

        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.

        T 1 Reply Last reply
        0
        • J Jia100

          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.

          T Offline
          T Offline
          T2102
          wrote on last edited by
          #4

          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?

          J 1 Reply Last reply
          0
          • T T2102

            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?

            J Offline
            J Offline
            Jia100
            wrote on last edited by
            #5

            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.

            T 1 Reply Last reply
            0
            • J Jia100

              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.

              T Offline
              T Offline
              T2102
              wrote on last edited by
              #6

              My guess is that you need to recompile your dlls that you are using.

              1 Reply Last reply
              0
              • J Jia100

                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?

                S Offline
                S Offline
                Stefan_Lang
                wrote on last edited by
                #7

                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.

                J 1 Reply Last reply
                0
                • S Stefan_Lang

                  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.

                  J Offline
                  J Offline
                  Jia100
                  wrote on last edited by
                  #8

                  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.

                  S 1 Reply Last reply
                  0
                  • J Jia100

                    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.

                    S Offline
                    S Offline
                    Stefan_Lang
                    wrote on last edited by
                    #9

                    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?

                    J 1 Reply Last reply
                    0
                    • S Stefan_Lang

                      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?

                      J Offline
                      J Offline
                      Jia100
                      wrote on last edited by
                      #10

                      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...

                      S 1 Reply Last reply
                      0
                      • J Jia100

                        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...

                        S Offline
                        S Offline
                        Stefan_Lang
                        wrote on last edited by
                        #11

                        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.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups