Solved

Attach debugger to perl.exe process when calling my dll

Posted on 2007-11-14
4
574 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now