0

I am writing a plugin for a 3rd party app (which I only have the .EXE and dot net .DLL for).

The way I code the plugin is by creating a Visual Studio C# library project, add the .EXE and .DLL files from the 3rd party app as references, then extend the IPlugin class defined in the .DLL.

After I build my project I take my plugin's .DLL and copy it to the 3rd party application's Plugins directory then start the application. From that point on I really don't know what happens at that point. I guess the application dynamically loads my DLL by scanning the Plugins folder then loads it (all that stuff I know nothing about).

At that point the application is running as a .EXE.

Is there a way I can use Visual Studio to attach to the .EXE (process) and then debug my DLL code that's running from withing that process?

I know my code is "in there" somewhere but since it's not an .EXE I don't see how I could attach to it. Thank you,

Jan

Jan Tacci
  • 3,131
  • 16
  • 63
  • 83

1 Answers1

0

This is an old question, so you may already have the answer. Still, in case it helps:

You didn't mention which version of Visual Studio. I do what you are asking about all the time with a C++ DLL in VS 2010. Open the property page for the Debug configuration. Under "Debugging" set "Command" to the host EXE (including path).

You should also set the output directory (General->Output Directory) to the plugin folder for your host, so that it will load the debuggable version when you hit Run.

rpatters1
  • 382
  • 1
  • 11