Solved

Launching MSDEV as System Debugger

Posted on 2000-04-04
4
950 Views
Last Modified: 2013-12-28
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
0
Comment
Question by:ayang_ca
  • 2
4 Comments
 
LVL 86

Expert Comment

by:jkr
Comment Utility
>>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.
0
 

Author Comment

by:ayang_ca
Comment Utility
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.

0
 

Accepted Solution

by:
ayang_ca earned 50 total points
Comment Utility
Problem solved:

The registry value was not correct and so NT was unable to locate the debugger executable.

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

The registry doesn't handle embedded spaces in long pathnames, so it was unable to find the msdev.exe file.  

From the Task Manager, I selected a running process, and chose Debug from the context menu - a "file not found" message popped up, tipping me off to the solution.

0
 
LVL 3

Expert Comment

by:darinw
Comment Utility
Moving question to PAQ.

darinw
Customer Service
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now