Application launched by another program, how to debug?
-
Vaguely years ago I recall being able to do this, but I'm having a senior moment. I have a program, lets call it test.exe, that is launched by another program that starts as a service. Is there a way to configure VS2015 to launch and run test.exe in the debugger?
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
Vaguely years ago I recall being able to do this, but I'm having a senior moment. I have a program, lets call it test.exe, that is launched by another program that starts as a service. Is there a way to configure VS2015 to launch and run test.exe in the debugger?
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Hi, You are probably looking for the 'Image File Execution' registry key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options If you want to avoid manually editing registry keys... you can download GFlags[^] to enable automatic debugger attachment. All it really does is set those registry keys for you. Best Wishes, -David Delaune
-
Hi, You are probably looking for the 'Image File Execution' registry key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options If you want to avoid manually editing registry keys... you can download GFlags[^] to enable automatic debugger attachment. All it really does is set those registry keys for you. Best Wishes, -David Delaune
ooookay, I didn't expect that answer. Totally new to me, I'll look into it.
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
ooookay, I didn't expect that answer. Totally new to me, I'll look into it.
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
Vaguely years ago I recall being able to do this, but I'm having a senior moment. I have a program, lets call it test.exe, that is launched by another program that starts as a service. Is there a way to configure VS2015 to launch and run test.exe in the debugger?
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Assuming that test.exe is a Debug version, or you have the source, you can just launch it directly from Visual Studio. But if it is not a Debug version you will not get much useful information from the debugger. [edit] Also you can attach the debugger to a running process. [/edit]
-
charlieg wrote:
ooookay, I didn't expect that answer.
Liquid Nitrogen. It's what I use for branding my cattle[^].
charlieg wrote:
Totally new to me
I highly recommend learning how to use all of the debugging tools. Best Wishes, -David Delaune
Lol, just perused the gflags area. Might be a little heavy for what I need, but very interesting items. Thanks
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
Assuming that test.exe is a Debug version, or you have the source, you can just launch it directly from Visual Studio. But if it is not a Debug version you will not get much useful information from the debugger. [edit] Also you can attach the debugger to a running process. [/edit]
I have the debug code, so this approach might work. I normally live in the embedded world, and the magic of attaching to running processes to debug is mostly a foreign concept. I hope this works....
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
I have the debug code, so this approach might work. I normally live in the embedded world, and the magic of attaching to running processes to debug is mostly a foreign concept. I hope this works....
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
Lol, just perused the gflags area. Might be a little heavy for what I need, but very interesting items. Thanks
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
charlieg wrote:
Might be a little heavy for what I need, but very interesting items.
Two thoughts: 1.) If you actually want to debug an error occuring when ProgramB is launched from ProgramA. There is no other way. 2.) If your question was worded incorrectly and you just simply need to debug ProgramB then just attach a debugger to it. Best Wishes, -David Delaune