Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Attach debugger to perl.exe process when calling my dll

Posted on 2007-11-14
4
Medium Priority
?
613 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
[X]
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
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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.
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

730 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