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. Stepping thru binary of debug version produces different result than running the debug binary (MSVS)

Stepping thru binary of debug version produces different result than running the debug binary (MSVS)

Scheduled Pinned Locked Moved C / C++ / MFC
debugginghtmlquestionannouncement
3 Posts 3 Posters 3 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.
  • C Offline
    C Offline
    chasetoys
    wrote on last edited by
    #1

    Hey folks I'm writing .html files to disk, and when I run my application normally, I get several garbage characters. When I step thru the debugger and look at the functions CreateFile and WriteFile and what I'm passing them, the program not passes appropriate values, but actuall produces files free of any garbage. I'm really concerned that if stepping thru the debugger doesn't find these errors, I'll never be able to find them by hand. Any ideas on making the debugger comply with the real world (turning off stuf.. etc)? Thanks!

    K 1 Reply Last reply
    0
    • C chasetoys

      Hey folks I'm writing .html files to disk, and when I run my application normally, I get several garbage characters. When I step thru the debugger and look at the functions CreateFile and WriteFile and what I'm passing them, the program not passes appropriate values, but actuall produces files free of any garbage. I'm really concerned that if stepping thru the debugger doesn't find these errors, I'll never be able to find them by hand. Any ideas on making the debugger comply with the real world (turning off stuf.. etc)? Thanks!

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

      Your problem might be the result of the different new() functionality. In debug mode, the allocated buffer is filled with nulls. In release mode, it isn't. Else, try a Rebuild All in debug mode.

      V 1 Reply Last reply
      0
      • K kakan

        Your problem might be the result of the different new() functionality. In debug mode, the allocated buffer is filled with nulls. In release mode, it isn't. Else, try a Rebuild All in debug mode.

        V Offline
        V Offline
        Viorel
        wrote on last edited by
        #3

        kakan wrote:

        In debug mode, the allocated buffer is filled with nulls.

        (Actually, it seems that the new operator in debug mode fills the buffer with 0xCD value, at least in VS 2003).

        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