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.


I haven't used MSVC6 in years, but I remember the debugger basically being a flaky piece of crap. Things like this would regularly happen for no apparent reason because it just didn't like your code that day.

In addition to the debugger being a flaky piece of crap, the rest of it was too.

It's STL implementation isn't threadsafe, it doesn't support very much of the C++ standard, and the IDE is sorely lacking in niceties.

I'm pretty sure you also just simply can't use any versions of the Platform SDK from the last 5 years because it's too old to grok them. Not a good thing.

You'd be mad to keep using it when there is Visual C++ Express 2008 which you can download for free.

Orion Edwards
+1  A: 

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.


Is it specific to the app you're working on or do all breakpoints in any app break the debugger?

Is anything different if you attach the debugger manually after launching the app normally?

Aidan Ryan
+1  A: 

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.

Jon Clegg

Is the device running out of memory and therefore gives up the ghost when it requires the additional memory to stop at the breakpoint?


Is the device running out of memory and therefore gives up the ghost when it requires the additional memory to stop at the breakpoint?

No, there's over a gig of RAM to go, and even more of virtual memory.