Solved

Launching MSDEV as System Debugger

Posted on 2000-04-04
4
959 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 50 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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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…

752 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