Reputation: 21730
I have a solution with three projects:
To debug, I start SerialPortEmulator and then debug (F5) the main project.
Two problems:
Question: Ideally I want to have emulator project be started on debug, and terminated on debug-stop. Is there easy way to do that?
I could have the emulator in a different solution, but then I need to ensure the interfaces definition library is always in sync.
Upvotes: 0
Views: 460
Reputation: 31928
You can try to write a macro to catch the OnEnterRunMode
Private Sub DebuggerEvents_OnEnterRunMode(ByVal Reason As EnvDTE.dbgEventReason) _
Handles DebuggerEvents.OnEnterRunMode
// Run emulator here
End Sub
As for the clean of stop, have a look at my previous answer (Executing clean up code when debugging stops)
Upvotes: 1