Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Attach debugger to perl.exe process when calling my dll

Posted on 2007-11-14
4
Medium Priority
?
623 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 500 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 500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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 column That will then direct you to their download page. From that p…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

972 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