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. why doesn't the cursor piont to the excuted line in single step debug?

why doesn't the cursor piont to the excuted line in single step debug?

Scheduled Pinned Locked Moved C / C++ / MFC
c++algorithmsdebuggingperformancequestion
4 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.
  • L Offline
    L Offline
    liuyue
    wrote on last edited by
    #1

    i use vc2005. when i debug in a function,the cursor doesn't piont to the excuted line. it piont to other lines before the excuted line. this has happened both in my own functions and functions of mfc library. i am using c++,mfc, xp professional sp2, and compiling with /Od (Disable optimization) . i clean the solution, and rebuild it. it don't become normal. how shold i do?

    W J 2 Replies Last reply
    0
    • L liuyue

      i use vc2005. when i debug in a function,the cursor doesn't piont to the excuted line. it piont to other lines before the excuted line. this has happened both in my own functions and functions of mfc library. i am using c++,mfc, xp professional sp2, and compiling with /Od (Disable optimization) . i clean the solution, and rebuild it. it don't become normal. how shold i do?

      W Offline
      W Offline
      Waldermort
      wrote on last edited by
      #2

      This often happens when you change the source code files outside of VS, the .obj files produced by the compiler don't allign with the .cpp files. VS only checks for changes of code, not comments or white space. Try deleting the Debug folder and perform a full rebuild of your exe, dlls and libs.

      1 Reply Last reply
      0
      • L liuyue

        i use vc2005. when i debug in a function,the cursor doesn't piont to the excuted line. it piont to other lines before the excuted line. this has happened both in my own functions and functions of mfc library. i am using c++,mfc, xp professional sp2, and compiling with /Od (Disable optimization) . i clean the solution, and rebuild it. it don't become normal. how shold i do?

        J Offline
        J Offline
        jhwurmbach
        wrote on last edited by
        #3

        This happens when the code compiled from and the code-file displayed are different. Somewhere upstream, a line has been deleted (and probably other lines have been rewritten). So the debugger, brainless as it is, displays the source line it gets from the PDB, which is not the one it should have been displaying. Do you have installed several VC++ in parallel and are shown the wrong one? Do you edited your file and did not recompile?


        "We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation." -- Caius Petronius, Roman Consul, 66 A.D.

        K 1 Reply Last reply
        0
        • J jhwurmbach

          This happens when the code compiled from and the code-file displayed are different. Somewhere upstream, a line has been deleted (and probably other lines have been rewritten). So the debugger, brainless as it is, displays the source line it gets from the PDB, which is not the one it should have been displaying. Do you have installed several VC++ in parallel and are shown the wrong one? Do you edited your file and did not recompile?


          "We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation." -- Caius Petronius, Roman Consul, 66 A.D.

          K Offline
          K Offline
          krmed
          wrote on last edited by
          #4

          Try closing your project and deleting the .ncb file. Re-open the project and the .ncb file will be rebuilt, and I believe you may be OK after that. Good luck.

          Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

          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