简体   繁体   English

在VS2012下调试多个项目-主项目调用一个子项目

[英]Debugging multiple projects under VS2012 - Main project invokes a sub-project

I have a solution that has 2 projects. 我有一个有2个项目的解决方案。 The main one and the one that is called with CreateProcess() from the main program. 主程序和从主程序使用CreateProcess()调用的程序。

The main one is a win32 program and the second a console application. 主要的一个是win32程序,第二个是控制台应用程序。 I use the win32 program to invoke the console app and have it do its thing. 我使用win32程序来调用控制台应用程序,并使其发挥作用。 My problem is, I want to be able to debug the console app once it's invoked with CreateProcess. 我的问题是,一旦使用CreateProcess调用控制台应用程序,我希望能够对其进行调试。

How can I accomplish this? 我该怎么做? or Can I accomplish this? 或我能做到这一点吗?

I'm also a little confused with the Debugger API as I want Visual Studio to be the debugger, instead of me creating the debugger. 我也对Debugger API感到有些困惑,因为我希望Visual Studio成为调试器,而不是我创建调试器。

Call DebugBreak(); 调用DebugBreak(); at the start of the console process. 在控制台过程开始时。 When it hits that call you will be able to start a new instance of Visual Studio to debug the console process. 遇到该调用时,您将能够启动Visual Studio的新实例以调试控制台进程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM