且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从任务计划程序调试Windows控制台应用程序

更新时间:2023-02-19 18:30:04

尝试使用 Debugger.Launch().

将此行放在 main 的第一行中,在此项目中将Visual Studio保持打开状态,编译您的项目,安排任务以运行新的已编译可执行文件,然后等待程序询问您打开Visual Studio进行调试.

Put this line in your first line in the main, hold Visual Studio open in this project, compile your project, schedule a task to run your new compiled executable, and wait for your program will ask you to open Visual Studio to debug.