Getting it off my chest: debugging in vc++ under dotnet

  • Thread starter Thread starter Craig
  • Start date Start date
C

Craig

I started this week recomipling all our projects under vc++7 which is ok by
me. most of it worked fine and what the compiler spat out was quickly fixed
without too much bother.

Then came a service. Now this services works a treat under vc++6. under
vc++7 it runs but completely skips over the most important part, i.e. the
bit that does the work. I could handle this a whole lot better if the
debugger wasn't so painfully slow. Its like pulling your own teeth out. It
got so bad I had to just lock my computer, come home and start typing this.
Tomorrow I'm back on the same job. Hoorah.

So does anyone out there know if there is any extra features on the debugger
that could be switched off. I've tried all sorts and it just drags on and on
and on and on and on and on and on and on and on and I could go on but I
won't.

Regards
Craig.
 
Craig said:
Then came a service.
OK.

Now this services works a treat under vc++6. under
vc++7 it runs but completely skips over the most important part, i.e. the
bit that does the work.

I don't know what this means. How does it skip over what you want to debug?
I could handle this a whole lot better if the
debugger wasn't so painfully slow.

Yeah, it is slower than VC6. Does your development system satisfy the
minimum requirements:

http://msdn.microsoft.com/vstudio/productinfo/sysreqs/default.aspx

If it satisfies them just barely, I'm not sure that there is an option
except the one that costs some cash, i.e. a faster processsor, more memmory
or a faster disk.
So does anyone out there know if there is any extra features on the debugger
that could be switched off. I've tried all sorts and it just drags on and on
and on and on and on and on and on and on and on and I could go on but I
won't.

I don't. Perhaps someone else will suggest something. I vaguely recall old
posts about the interaction of VS and some source control system slowing
things down but I forget the details. What do you use? Perhaps it will run a
bell with someone.

Regards,
Will
 
I could handle this a whole lot better if the
debugger wasn't so painfully slow.

Craig.

Make sure you've not got the debugger set to debug for both native and
managed code, I seem to recall that makes it much slower.

Dave
 
David,

That has really helped a lot. The performance of the debugger is almost back
to how it was in vc6.

Many thanks.
 
Hi Will,

Sorry my email was written through red mist and isn't as clear as it should
be.

Thanks to the help from David in this thread teh debugger is now running a
lot faster so debugging this problem isn't so painful.

The bit about "skips over the most important part" is due to a problem that
seems to come from AfxGetModuleState(). If a library exports 2 classes then
the list of classes in that DLL that can be seen through the structure
returned by AfxGetModuleState() only lists 1. The same with libraries that
export 4 classes, only 3 can be accessed through the structure. In each case
the missing one was the real meaty part that did the actual processing. I
have been through the project settings, code, dependecy walker, viewed the
..exp file myself, accessed the classes using a simple MFC .EXE but it just
doesn't work using AfxGetModuleState() in mfc7 even though it did in mfc6.

On the bright side I might be able to talk my way into a nice new pure .NET
project to rewrite all this stuff.

That 3rd sentence probably makes no sense either but when you can't remember
the structure names and don't have the code at hand its all a little hard to
describe.

Regards,
Craig.
 
Craig said:
The bit about "skips over the most important part" is due to a problem that
seems to come from AfxGetModuleState(). If a library exports 2 classes then
the list of classes in that DLL that can be seen through the structure
returned by AfxGetModuleState() only lists 1. The same with libraries that
export 4 classes, only 3 can be accessed through the structure. In each case
the missing one was the real meaty part that did the actual processing. I
have been through the project settings, code, dependecy walker, viewed the
.exp file myself, accessed the classes using a simple MFC .EXE but it just
doesn't work using AfxGetModuleState() in mfc7 even though it did in mfc6.

I'll take you word for it. :-) I don't know anything of MFC and even if I
did, I doubt that I would shove it into a service.

For the benefit of anyone lurking, I can tell you though, that with the IDE
debuggers from VC6, VS.Net2002, VS.Net2003 as well as WINDBG I have had no
trouble debugging a service.

Regards,
Will
 
Back
Top