调试第三方应用程序启动的命令行程序 [英] Debugging a command line program launched by a third-party app
问题描述
你好
我用C/C ++编写了一个本地命令行程序.我们称它为B.
并且有一个用Java编写并通过Windows的.js脚本文件启动的第三方应用程序.我们称它为A.
在稍后的阶段和运行时,单击A中的按钮,我的B程序开始运行并完成其工作.
我想做的是调试A启动时的B,并且完全是从B的main()函数中调试的.
我知道这是可能的,尽管当B是一个dll时,尽管使用不同的actor.
我也知道,在我的场景中,我可能会插入__debugbreak()或int 3指令以生成异常并将Visual Studio附加到B.但是由于某些原因,这种情况在我的情况下是不可能的. /p>
有什么主意我可以调试B吗?
谢谢
您可以尝试
图像文件执行选项"
https://msdn.microsoft.com/zh-CN/library/a329t4ed(v = vs.100).aspx尽管对于控制台应用程序而言,初始断点似乎比main()早一点:
以诚挚的问候
Hello,
I have made a native command line program in C/C++. Let's call it B.
And there is a third-party app written in Java and launched through a .js script file from Windows. Let's call it A.
In a later stage and at running time, clicking on a button from A, my B program starts running and does its job.
What I'd like to do is debugging B when is launched by A and exactly from B's main() function.
I know that is possible, although with different actors, when B is a dll.
And I know also that in my scenario I might insert a __debugbreak() or int 3 instruction in order generate an exception and attach Visual Studio to B. But for several reasons this otpion is not possible in my case.
Any idea how I can debug B?
Thank you
You may try
'Image File Execution Options'
https://msdn.microsoft.com/en-us/library/a329t4ed(v=vs.100).aspxthough initial breakpoint seems a little bit earlier than main() for console-app:
With kind regards
这篇关于调试第三方应用程序启动的命令行程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!