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
Solved

Launching MSDEV as System Debugger

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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

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).
An article on effective troubleshooting
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

860 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