Debugging an External EXE + DLL

Hi all,

I'm trying to figure out a way to debug an EXE+DLL combo using VS 2005.

During the execution, these binaries are invoked by the browser. I kknow this is very little information. I'm trying to figure out more.

Right now I'm stuck with just log statements for debugging.

Is there a way in which I can have a proper debugging session setup like normal VS projects.
And, the binaries are compiled using VS 2005, but the solution is in make file format. Don't have VS solution files. The code is completely in C, C++ and win32.

As of now, I have tried creating a EXE project from the executable. [ Ref: http://msdn.microsoft.com/en-us/library/0bxe8ytt(v=vs.90).aspx ].

Any help and guidance is much appreciated. Thanks.
Last edited on
I'm not sure about VS2005 but in 2012 under the debug menu you can select attach to process and select a running process to debug.
Are you talking about debugging a browser plugin? That is, is the exe you're referring to a web browser and the DLL a plug-in?

I've debugged both Internet Explorer and Firefox plug-ins using Visual Studio 2005 and 2008. With Firefox you can make life a lot easier by disabling the plug-in container mechanism so the plug-in is loaded directly into the Firefox process; then you can just make Firefox the debug target.

If you can't do this, it might help if you compile in (while developing) a debug break to force the debugger to attach just where you want it to, rather than attaching as some random point (this assumes you've configured Visual C++ as your JIT debugger.)

The debugger doesn't care what you built your binary with as long as it's got debug symbols.

Andy
Last edited on
Thanks for the reply naraku9333 and Andy.

Andy,
The EXE I'm taking about is an application in the Windows machine. The DLL is an ActiveX DLL which acts as an add-on in the IE browser.

Basically, a call to the ActiveX DLL is triggered by a javascript in a html page loaded on the browser. The DLL inturn invokes the EXE.
When you say invoke and exe, you you mean CreateProcess or similar? Or this also via COM?

If you are controlling your exe via COM, then Visual Studio will automatic launch a second instance of itself and step into the new process if you've checked "Enable RPC Debugging" (on the Native tab of the Debugging options.)

Andy
Topic archived. No new replies allowed.