Solved

Attach debugger to perl.exe process when calling my dll

Posted on 2007-11-14
4
590 Views
Last Modified: 2013-12-14
I have a regular windows dll written in Visual C++ 8.0  (no com, .NET or anything fancy).  I want to set a breakpoint in the dll code from within Visual Studio IDE to be hit after the dll is called by a perl script.

The best thing I have come up with is to stick an assert(false);  in my dll where I want it to break, and have it throw an unhandled exception, then attach the debugger .  

There must be more elegant way.
0
Comment
Question by:GSIJoe
4 Comments
 
LVL 40

Accepted Solution

by:
evilrix earned 125 total points
ID: 20292845
You can make code go into the debugger using the __debugbreak intrinsic

http://msdn2.microsoft.com/en-us/library/f408b4et(VS.80).aspx

"Causes a breakpoint in your code, where the user will be prompted to run the debugger."
0
 
LVL 49

Assisted Solution

by:DanRollins
DanRollins earned 125 total points
ID: 20310182
You can set VS to execute the DLL.  When it tries to start the DLL, up pops a dialog box asking what app you want run.  Just give it the pathname off the Perl executable.  Once it is running, you can set breakpoints, etc.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20520505
Forced accept.

Computer101
EE Admin
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

830 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