Link to home
Start Free TrialLog in
Avatar of ayang_ca
ayang_ca

asked on

Launching MSDEV as System Debugger

I'm trying to debug a service program using DebugBreak() on Windows NT 4.0 Workstation SP5. Under Visual Studio 97 (VC++ 5) a message box would pop up saying a debug break had been encountered. Cancel would launch an instance of VC++ 5.

I now have VC++ 6 installed and the following registry keys set:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger =
E:\Microsoft Visual Studio\VC98\Bin\msdev.exe -p %ld -e %ld

My problem is that after it asks me whether I want to debug, no debugger is launched, and the service appears to be hanging while it waits for a debugger to come up.

I have the Platform SDK installed and I've tried replacing the above registry key with WinDbg, but still, nothing gets launched.

Any ideas as to why I can't launch a debugger?

Thanks
Avatar of jkr
jkr
Flag of Germany image

>>Any ideas as to why I can't launch a debugger?

The debugger *is* launched (you can check this using the task manager), but, as you're trying to debug a service, it runs on a different window station than the one you're seeing. To overcome this, go to the control panel, choose the 'services' applet, select your service and enable 'allow desktop interaction' in the 'Start Type' settings.
Avatar of ayang_ca
ayang_ca

ASKER

Hi jkr,

I tried your advice but I don't think it's the right solution for my situation.  The behaviour is still the same.

I've also tried launching a debugger from a regular win32 app (not a service) using DebugBreak() and I get the same result.

There isn't another instance of msdev.exe in my Task Manager, but sometimes there *is* a rvsim.exe process.

ASKER CERTIFIED SOLUTION
Avatar of ayang_ca
ayang_ca

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Moving question to PAQ.

darinw
Customer Service