?
Solved

Launching MSDEV as System Debugger

Posted on 2000-04-04
4
Medium Priority
?
964 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 2684262
>>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
ID: 2684308
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 200 total points
ID: 2684436
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
ID: 2685655
Moving question to PAQ.

darinw
Customer Service
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
A small collection of useful tips and tricks for Windows 10 users that I decided to write as a result of recent questions that were asked and answered at Experts Exchange. Two short video tutorials included. Enjoy..
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

719 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