Visual C 5 single stepping and breakpoint problems 
Author Message
 Visual C 5 single stepping and breakpoint problems

  Hi all.

  I have a problem with Visual C and single stepping some projects.
If I set a breakpoint on a certain line then it breaks fine, but on
the next line after the one where the breakpoint is.

  Then, if I try to single step then it single steps the *code*
properly but will display the incorrect line on the screen.  Also, in
dissasembly mode it will display lines out of order, ie. Line 21, then
47, then 22 etc.  Line 47 is the one that will be displayed when you
try to single step from line 21.

  Anybody had any experience with this?



Mon, 06 Nov 2000 03:00:00 GMT  
 Visual C 5 single stepping and breakpoint problems

I had this problem when I first started using VC++ in anger. The problem was
due to the fact that my 'debug' version was being compiled with
optimisations. To debug properly the properties for the 'debug' version
should specify NO compiler optimisations.

Hope this helps

--
Regards
Sean Clarke


Quote:

>  Hi all.

>  I have a problem with Visual C and single stepping some projects.
>If I set a breakpoint on a certain line then it breaks fine, but on
>the next line after the one where the breakpoint is.

>  Then, if I try to single step then it single steps the *code*
>properly but will display the incorrect line on the screen.  Also, in
>dissasembly mode it will display lines out of order, ie. Line 21, then
>47, then 22 etc.  Line 47 is the one that will be displayed when you
>try to single step from line 21.

>  Anybody had any experience with this?



Mon, 06 Nov 2000 03:00:00 GMT  
 Visual C 5 single stepping and breakpoint problems

Colin,

        Yes.  I have encountered this when VC++ decides it doesn't need to link
something it compiled prior to running it.  I often just compile (CTRL +
F7) while working on code bugs.  Then, When I think I have it working (or
it finally compiles!) I hit the "run to cursor " function (CTRL + F10).
VC++ SHOULD be smart enough to ALWAYS recognize that it needs to link prior
to running, but sometimes it just doesn't.  If you find this happening, try
hitting F7 to force a manual compile and see if that solves the problem.

        Thanks,
        PeterM

--
Bogus X added to address.  Remove for reply.



Quote:
>   I have a problem with Visual C and single stepping some projects.
> If I set a breakpoint on a certain line then it breaks fine, but on
> the next line after the one where the breakpoint is.

>   Then, if I try to single step then it single steps the *code*
> properly but will display the incorrect line on the screen.  Also, in
> dissasembly mode it will display lines out of order, ie. Line 21, then
> 47, then 22 etc.  Line 47 is the one that will be displayed when you
> try to single step from line 21.



Sat, 11 Nov 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. SIngle step and breakpoint debugger problems

2. not working: single step debugging into a loaded assembly nor setting breakpoint

3. Visual C++.Net Step by Step book/Visual C++.Net Software

4. Single-Stepping Problem

5. HELP - need excercise files CDrom Visual C# .NET step by step

6. Microsoft Press, Visual C# Step by Step Chapter 31 Data Access

7. Book: Visual C++.Net Step by Step

8. suddenly slow .net debug single-stepping

9. How to skip CString in single-step?

10. single-stepping in a multi-threaded process

11. Single Stepping into MFC Sources?

12. Single Step Debug Function in DevStudio 97?

 

 
Powered by phpBB® Forum Software