VS2008:在调试时启动外部程序
我有一个包含三个项目的解决方案:
- 是一个用于通过串行端口连接的设备的控制台(GUI 应用程序)。
- 串行端口模拟(控制台应用程序、自托管 WCF 服务)。
- 通用接口。
为了进行调试,我启动 SerialPortEmulator,然后调试 (F5) 主项目。
两个问题:
- 启动模拟器需要额外的击键。
- 我需要记住在编译之前停止模拟器(以防发生重大更改)。
问题:理想情况下,我希望模拟器项目在调试时启动,并在调试停止时终止。有简单的方法吗?
我可以在不同的解决方案中使用模拟器,但随后我需要确保接口定义库始终保持同步。
I have a solution with three projects:
- is a console (GUI app) for a device connected through Serial Port.
- Serial Port emulation (console app, self-hosted WCF service).
- Common interfaces.
To debug, I start SerialPortEmulator and then debug (F5) the main project.
Two problems:
- It takes extra keystrokes to start the emulator.
- I need to remember to stop the emulator before compiling (in case there are breaking changes).
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试编写一个宏来捕获
OnEnterRunMode
至于停止的清理,看看我的 上一个答案(调试停止时执行清理代码)
You can try to write a macro to catch the
OnEnterRunMode
As for the clean of stop, have a look at my previous answer (Executing clean up code when debugging stops)