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. How do I debug a release build?

How do I debug a release build?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++comdebuggingtools
4 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.
  • B Offline
    B Offline
    bulg
    wrote on last edited by
    #1

    I know the title's inflammatory, but what I'm asking is, are there any tools out there that let me figure out more closely wtf is crashing in a release build, other than

    MFC42.DLL exception 0xC00000191
    000191: ???
    000192: ???
    000193: ???

    Something like windows message monitor?? It's an MFC app, interfaces with some multithreaded COM dlls. ty

    R 1 Reply Last reply
    0
    • B bulg

      I know the title's inflammatory, but what I'm asking is, are there any tools out there that let me figure out more closely wtf is crashing in a release build, other than

      MFC42.DLL exception 0xC00000191
      000191: ???
      000192: ???
      000193: ???

      Something like windows message monitor?? It's an MFC app, interfaces with some multithreaded COM dlls. ty

      R Offline
      R Offline
      Rolf Kristensen
      wrote on last edited by
      #2

      If you create a Program DataBase (PDB) file with Debug-information, then you can debug Release builds. Set the C++/C compiler option "Debug Information Format" to "Program Database" and set the Linker option "Generate Debug Info" to "YES /DEBUG". If you also want to use watches etc. while debugging the release build, then you can set the C++/C compiler option "Optimisation" to "Disabled".

      B 1 Reply Last reply
      0
      • R Rolf Kristensen

        If you create a Program DataBase (PDB) file with Debug-information, then you can debug Release builds. Set the C++/C compiler option "Debug Information Format" to "Program Database" and set the Linker option "Generate Debug Info" to "YES /DEBUG". If you also want to use watches etc. while debugging the release build, then you can set the C++/C compiler option "Optimisation" to "Disabled".

        B Offline
        B Offline
        bulg
        wrote on last edited by
        #3

        How would I mimic a break point, or should I just break it manually & "run to cursor"

        S 1 Reply Last reply
        0
        • B bulg

          How would I mimic a break point, or should I just break it manually & "run to cursor"

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          You don't have to 'mimic' a breakpoint when you have enabled debug information in the Release build - just put one in as with a Debug build. The only problem is that as optimisations are turned on, you'll find the following problems:

          • Some, or possibly all, local data items won't be accessible - hte compiler may have optimised away all need for them
          • Some lines of code won't take a breakpoint. This is because they've been optimised away.
          • The assembly language can be more difficult to trace to the source than when optimisations are turned off

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

          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