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 in release mode

break point not hit in release mode

Scheduled Pinned Locked Moved C / C++ / MFC
c++windows-admindebuggingquestionannouncement
8 Posts 4 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
    rayjoslyn
    wrote on last edited by
    #1

    I have some code that is not getting executed in release mode. The code is in appui3.cpp in microsofts library. The method is GetProfileInt. I am trying to read some prefereces from the registry. It is working in debug mode, but in release it doesn't seem to be going to the method therefore I am not getting expected data. I am compiling with the /ZI switch for debug info in release mode also. Using VS2008. Any ideas? Thanks Ray

    _ S L 3 Replies Last reply
    0
    • R rayjoslyn

      I have some code that is not getting executed in release mode. The code is in appui3.cpp in microsofts library. The method is GetProfileInt. I am trying to read some prefereces from the registry. It is working in debug mode, but in release it doesn't seem to be going to the method therefore I am not getting expected data. I am compiling with the /ZI switch for debug info in release mode also. Using VS2008. Any ideas? Thanks Ray

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      You could try by disabling optimizations. For reading data from the registry use the registry functions instead.

      «_Superman_» I love work. It gives me something to do between weekends.
      Microsoft MVP (Visual C++)

      R 2 Replies Last reply
      0
      • _ _Superman_

        You could try by disabling optimizations. For reading data from the registry use the registry functions instead.

        «_Superman_» I love work. It gives me something to do between weekends.
        Microsoft MVP (Visual C++)

        R Offline
        R Offline
        rayjoslyn
        wrote on last edited by
        #3

        Yes I have disabled the optimization. Thanks for the input, but why is it still not executing this part of the code? Ray

        1 Reply Last reply
        0
        • R rayjoslyn

          I have some code that is not getting executed in release mode. The code is in appui3.cpp in microsofts library. The method is GetProfileInt. I am trying to read some prefereces from the registry. It is working in debug mode, but in release it doesn't seem to be going to the method therefore I am not getting expected data. I am compiling with the /ZI switch for debug info in release mode also. Using VS2008. Any ideas? Thanks Ray

          S Offline
          S Offline
          Stephen Hewitt
          wrote on last edited by
          #4

          Step through the code and see...

          Steve

          1 Reply Last reply
          0
          • R rayjoslyn

            I have some code that is not getting executed in release mode. The code is in appui3.cpp in microsofts library. The method is GetProfileInt. I am trying to read some prefereces from the registry. It is working in debug mode, but in release it doesn't seem to be going to the method therefore I am not getting expected data. I am compiling with the /ZI switch for debug info in release mode also. Using VS2008. Any ideas? Thanks Ray

            L Offline
            L Offline
            loyal ginger
            wrote on last edited by
            #5

            Since you have the source code, you can make a backup of it and then modify this file to help you debug. Use OutputDebugString() and the free dbgview from sysinternals.com (now MS). This works for release mode build.

            R 1 Reply Last reply
            0
            • L loyal ginger

              Since you have the source code, you can make a backup of it and then modify this file to help you debug. Use OutputDebugString() and the free dbgview from sysinternals.com (now MS). This works for release mode build.

              R Offline
              R Offline
              rayjoslyn
              wrote on last edited by
              #6

              My problem is that it never goes to this code in release mode. I've put a break point on it and it never hits it.

              R 1 Reply Last reply
              0
              • R rayjoslyn

                My problem is that it never goes to this code in release mode. I've put a break point on it and it never hits it.

                R Offline
                R Offline
                rayjoslyn
                wrote on last edited by
                #7

                Ok, I have decided that the code is getting executed, its just that when I step through in release mode it doesn't show me the actual steps it is taking nor are the value of the variables in the debugger valid. So back to my problem that prompted this message. My program gets an exception in release mode but not in debug, but if I can't step through the program or rely on the debug variables in release mode, then how do I find out what is causing the exception? Anyone??? Ray

                1 Reply Last reply
                0
                • _ _Superman_

                  You could try by disabling optimizations. For reading data from the registry use the registry functions instead.

                  «_Superman_» I love work. It gives me something to do between weekends.
                  Microsoft MVP (Visual C++)

                  R Offline
                  R Offline
                  rayjoslyn
                  wrote on last edited by
                  #8

                  Ok, I have decided that the code is getting executed, its just that when I step through in release mode it doesn't show me the actual steps it is taking nor are the value of the variables in the debugger valid. So back to my problem that prompted this message. My program gets an exception in release mode but not in debug, but if I can't step through the program or rely on the debug variables in release mode, then how do I find out what is causing the exception? I've turning on the debugging information /Zi, turned off optimization, and turned on generate debug info in the linker. Still can get no usefull info from the debugger in release mode. Any ideas? Ray

                  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