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. Is there a way to detect a debug build?

Is there a way to detect a debug build?

Scheduled Pinned Locked Moved C / C++ / MFC
c++debuggingquestionannouncement
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.
  • T Offline
    T Offline
    toddbrooks
    wrote on last edited by
    #1

    Given an executable compiled using VC++ (unmanaged), is there a way to identify if the EXE is a debug or release build? Obviously, if you had the two builds side by side, the larger would be the debug, but is there a way to detect if the EXE is a debug build? Regards

    N L 2 Replies Last reply
    0
    • T toddbrooks

      Given an executable compiled using VC++ (unmanaged), is there a way to identify if the EXE is a debug or release build? Obviously, if you had the two builds side by side, the larger would be the debug, but is there a way to detect if the EXE is a debug build? Regards

      N Offline
      N Offline
      Neville Franks
      wrote on last edited by
      #2

      Well one way would be to check its DLL dependancies and if it was using the MFC/CRT Debug DLL's you'd now. There are probably better ways. :) IMO Debug .EXE's should be able to identified by their filename, in the same way Debug DLL's are. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com

      1 Reply Last reply
      0
      • T toddbrooks

        Given an executable compiled using VC++ (unmanaged), is there a way to identify if the EXE is a debug or release build? Obviously, if you had the two builds side by side, the larger would be the debug, but is there a way to detect if the EXE is a debug build? Regards

        L Offline
        L Offline
        LizardWiz
        wrote on last edited by
        #3

        how about #ifdef _DEBUG /* do something here */ #endif is that what you were asking? ~LizardWiz()

        T 1 Reply Last reply
        0
        • L LizardWiz

          how about #ifdef _DEBUG /* do something here */ #endif is that what you were asking? ~LizardWiz()

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

          No, I was looking more for something to determine if a selected EXE is a debug build or not. Not from within code, but if someone just hands you an EXE, how can I determine if it is a DEBUG build. I think Neville answered my question...just wish there was a little easier solution. I was hoping for something more programmatic...an app I could drag and drop an EXE into or a shell extension that I could use to right click and select on an EXE in Explorer. thanks for the response, though.

          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