Question

The Situation

I've been hit with a situation that I've never encountered before. I have an application that uses a dll called client.dll. The Application stays in the bin\debug\ folder and is run using Build Events... every time the application builds. This works great, the program starts after the program is built and everything goes smoothly... until...

AN EXCEPTION/ERROR IS THROWN! The application is no longer being debugged because VS2010 isn't actually connected to the DLL any more.


My Question

Do any of you know a better way for me to handle this? Is there anyway for me to line-by-line debug like I would a normal WinForms application with this Class Library project?


Information

Build Events: CALL "$(SolutionDir)Client\bin\Debug\ClientRunner.exe"

Was it helpful?

Solution

The debugger was never attached in the first place. Don't do this with a build event. Instead, configure the debugger to run your ClientRunner.exe process whenever you start debugging with F5. Project + Properties, Debug tab. Tick the "Start external program" option and select your .exe.

You'll want to set a debug break in your class library source code, wherever you want to start debugging. And press F5.

Adding the project that created ClientRunner.exe to your solution and making it the Startup project could of course work too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top