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. Problem with debugger

Problem with debugger

Scheduled Pinned Locked Moved C / C++ / MFC
debugginghelpc++databasesysadmin
12 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.
  • R Offline
    R Offline
    Raghavendra Pise
    wrote on last edited by
    #1

    Hi friends, when i will debugg my project breakpoints are not setting properly.After debug i will get white color mark instead of red color. Error message:One or more breakpoints cannot be set and have ben disabled.Program stop the execution of program. These following setting i have done for debugger. 1)Project->setting->debug->server exe file path. 2)Project-> setting->c/c++->optimization->Disabled(debug) 3).........................-> debug info->Program database for edit and continue After buliding i am not getting pojectname.pdb. but i am getting Old project .pdb file.I guess problem with .pdb file.I hope anybady having some idea.please share your ideas.

    P K 2 Replies Last reply
    0
    • R Raghavendra Pise

      Hi friends, when i will debugg my project breakpoints are not setting properly.After debug i will get white color mark instead of red color. Error message:One or more breakpoints cannot be set and have ben disabled.Program stop the execution of program. These following setting i have done for debugger. 1)Project->setting->debug->server exe file path. 2)Project-> setting->c/c++->optimization->Disabled(debug) 3).........................-> debug info->Program database for edit and continue After buliding i am not getting pojectname.pdb. but i am getting Old project .pdb file.I guess problem with .pdb file.I hope anybady having some idea.please share your ideas.

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      Generally, this happens, if no debug symbol loaded for code, you have set breakpoint for.

      Prasad Notifier using ATL | Operator new[],delete[][^]

      R 1 Reply Last reply
      0
      • R Raghavendra Pise

        Hi friends, when i will debugg my project breakpoints are not setting properly.After debug i will get white color mark instead of red color. Error message:One or more breakpoints cannot be set and have ben disabled.Program stop the execution of program. These following setting i have done for debugger. 1)Project->setting->debug->server exe file path. 2)Project-> setting->c/c++->optimization->Disabled(debug) 3).........................-> debug info->Program database for edit and continue After buliding i am not getting pojectname.pdb. but i am getting Old project .pdb file.I guess problem with .pdb file.I hope anybady having some idea.please share your ideas.

        K Offline
        K Offline
        kakan
        wrote on last edited by
        #3

        Try a "Rebuild all"

        Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

        R 1 Reply Last reply
        0
        • K kakan

          Try a "Rebuild all"

          Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

          R Offline
          R Offline
          Raghavendra Pise
          wrote on last edited by
          #4

          "Rebuild all " dosent work.I have done it earlier.would please give other suggestions.

          K 1 Reply Last reply
          0
          • P prasad_som

            Generally, this happens, if no debug symbol loaded for code, you have set breakpoint for.

            Prasad Notifier using ATL | Operator new[],delete[][^]

            R Offline
            R Offline
            Raghavendra Pise
            wrote on last edited by
            #5

            I have set breakpoint for one function called DocOpenOldStyle().But it doesn't matter for function. May i know what type of setting i want to do?

            P 1 Reply Last reply
            0
            • R Raghavendra Pise

              "Rebuild all " dosent work.I have done it earlier.would please give other suggestions.

              K Offline
              K Offline
              kakan
              wrote on last edited by
              #6

              See the answer from prasad_som. Says it all. I can think of two resons for not reaching the breakpoint: 1. The code in question is commented out, or defined out. 2. You are not doing a debug build. If I'm wrong, (and a "Rebuild All" doesn't help), then I'm out of guesses.

              Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

              R 1 Reply Last reply
              0
              • R Raghavendra Pise

                I have set breakpoint for one function called DocOpenOldStyle().But it doesn't matter for function. May i know what type of setting i want to do?

                P Offline
                P Offline
                prasad_som
                wrote on last edited by
                #7

                What type of application, you are working with? Make sure following things, -You are using Debug configuration. -If you are developing dll/COM add-in, its loaded in target exe correctly.

                Prasad Notifier using ATL | Operator new[],delete[][^]

                R 1 Reply Last reply
                0
                • K kakan

                  See the answer from prasad_som. Says it all. I can think of two resons for not reaching the breakpoint: 1. The code in question is commented out, or defined out. 2. You are not doing a debug build. If I'm wrong, (and a "Rebuild All" doesn't help), then I'm out of guesses.

                  Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

                  R Offline
                  R Offline
                  Raghavendra Pise
                  wrote on last edited by
                  #8

                  Hi, Thanks for your suggestions. I got your second point.But i am sure that i am using Debug version of build.I clarify from Build-> Setactive configuration option from my code. But i didn't understand your First point clearly.Please explain briefly.

                  K 1 Reply Last reply
                  0
                  • P prasad_som

                    What type of application, you are working with? Make sure following things, -You are using Debug configuration. -If you are developing dll/COM add-in, its loaded in target exe correctly.

                    Prasad Notifier using ATL | Operator new[],delete[][^]

                    R Offline
                    R Offline
                    Raghavendra Pise
                    wrote on last edited by
                    #9

                    Hi Prasad, Thanks for ur suggestions. I am using Win32 appliaction, and Debug configuration. I have loaded target exe file properly.I am sure about this things. Inspite of these setting i am getting same error. We are implementing new project in that Debugger is not working, but in another system Debugger is running properly. I do not understand what is the probelm?

                    1 Reply Last reply
                    0
                    • R Raghavendra Pise

                      Hi, Thanks for your suggestions. I got your second point.But i am sure that i am using Debug version of build.I clarify from Build-> Setactive configuration option from my code. But i didn't understand your First point clearly.Please explain briefly.

                      K Offline
                      K Offline
                      kakan
                      wrote on last edited by
                      #10

                      OK. Assume you did wrote some code, i.e. a function. Then you put a breakpoint in that function. Later on you rewrote the entire function, but you didn't want to remove the first version of it. So you commented out (or defined out) the function (with the breakpoint still there). Now, the breakpoint cannot be reached, so VC++ will warn you and disable the breakpoint. An example: void class::func() { m_classvar = 0; // You out a breakpoint here } Now, you rewrite the function (and comment out the old version of it), like this (or with /* ... */): (notdef is not defined) #ifdef notdef void class::func() { m_classvar = 0; // You out a breakpoint here } #else // The rewritten function. void class::func() { m_classvar = 4; } #endif So, your breakpoint is set on a piece of code that will never be compiled, and hence, it will be disabled when you start your debugging session.

                      Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

                      R 1 Reply Last reply
                      0
                      • K kakan

                        OK. Assume you did wrote some code, i.e. a function. Then you put a breakpoint in that function. Later on you rewrote the entire function, but you didn't want to remove the first version of it. So you commented out (or defined out) the function (with the breakpoint still there). Now, the breakpoint cannot be reached, so VC++ will warn you and disable the breakpoint. An example: void class::func() { m_classvar = 0; // You out a breakpoint here } Now, you rewrite the function (and comment out the old version of it), like this (or with /* ... */): (notdef is not defined) #ifdef notdef void class::func() { m_classvar = 0; // You out a breakpoint here } #else // The rewritten function. void class::func() { m_classvar = 4; } #endif So, your breakpoint is set on a piece of code that will never be compiled, and hence, it will be disabled when you start your debugging session.

                        Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

                        R Offline
                        R Offline
                        Raghavendra Pise
                        wrote on last edited by
                        #11

                        Thanks for giving Example.But i havn't done like this in my code. Kakan it is very stange that we are running our older projcet with debugging option( Debugger working properly). but its doesn't work for my new projcet.

                        K 1 Reply Last reply
                        0
                        • R Raghavendra Pise

                          Thanks for giving Example.But i havn't done like this in my code. Kakan it is very stange that we are running our older projcet with debugging option( Debugger working properly). but its doesn't work for my new projcet.

                          K Offline
                          K Offline
                          kakan
                          wrote on last edited by
                          #12

                          I'm out of ideas here. But I suppose you can do what I do when it happens to me: Go to the line where your (disabled) breakpoint is. Press F9 twice. That should remove your old breakpoint and insert a new one, hopefully enabled.

                          Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

                          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