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