views:

63

answers:

3

Using Visual Studio 2005's Attach to Process, is it possible to select an application to run and then debug as opposed to an application that is already running?

I am trying to debug a FileMaker Plugin and I can debug it fine if I open FileMaker then use attach to process, but I now want to debug the initialisation of the plugin so need to debug as soon as the host application starts.

Is this possible?

+1  A: 

using F5. Drag and drop the exe file to Studio and then start Debug. You can launch the exe from Visual Studio itself and provide the dll names in "additional dlls"

aJ
A: 

Absolutely. I've had success with the method posted here and the Windows Debugging Tools.

You can also launch the process from your code and use Debugger.Attach to launch the debugger dynamically.

There is also a Visual Studio plugin that will handle this for you.

Alex
I found that plugin on another question but it didn't seem to load for me.
Adam Dempsey
+1  A: 

For a VS project you can easily specify the command to be executed in the Debug section of the project properties. You have not specified what language you're using but AFAIK you can specify the debug command in all of them.

For C++ this is located in the Debugging section, the property is Command. For C# under the Debug Tab, specify the external application to start.

Dan Cristoloveanu