Solved

Attach debugger to perl.exe process when calling my dll

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hide carret in RichEdit 4 62
Java eclipse error 2 68
NOTEPAD++ Meaning of (+) and (-) Icons 6 123
Angular JS Route 3 69
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ā€¦
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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.

776 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