Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSVC6: Breakpoint stops program

Using Microsoft Visual Studio 98, Microsoft Visual C++ 6.0 SP6

When running under the debugger, there's only one problem. If I pause the program and resume, everything's fine.

The problem? When I hit a breakpoint, my program stops. But not in a good way; execution halts, I'm thrown out of debug mode into edit mode. All's fine until a breakpoint is hit. And I know it's hitting the breakpoint - I see a flash of the little yellow arrow pointing at the right line of code, local variables in the inspect window and the call stack in that window. And then I'm staring at the editor.

This happens in all projects.

I've uninstalled and re-installed MSVC6. It didn't help.

I'm about to start over on a new PC; before I go that far, anyone know what I've done to this one?


Note: MSVC6 is not my choice, but there are reasons. It's the tool I work with. And, we get to target NT4, so given 2008 can't target NT4 and 2005 has issues with MFC and NT4, MSVC6 it is.

like image 252
Josh Avatar asked Aug 12 '08 04:08

Josh


2 Answers

Stop beating on VC6. It's old. The STL was updated in 1996 from HP code written in 1994. C++ was ratified in 1998.

What is the code doing when you are breaking? Can you reduce the situation into a simple test. When I try that I usually find the cause. If you can do that so it still happens then I'll take a look at it for you. I too am unfortunate enough to use VC6 for my day to day work.

Visual C++ Express 2008 can't be used in certain situations.

like image 115
graham.reeds Avatar answered Oct 18 '22 07:10

graham.reeds


The first thing I would check is if this project does the same thing on other machines. If not, it could be your box is heading south. If not it's the VC6 project itself.

Typically I get goofiness with the debugger when my program is doing something with the hardware, especially the video.

I would recommend turning off parts of your program until you figure out what part is causing this. If your program is small and not doing much it might be that the project is corrupted and needs to get rebuilt. Make a new project from scratch and put your files and settings back in by hand.

like image 34
Jon Clegg Avatar answered Oct 18 '22 08:10

Jon Clegg