Is it possible to attach ProcessMonitor to an already running target process on Windows? #674
-
Hi all, is it possible to attach ProcessMonitor to an already running target process on Windows or do I need to start the process with the ProcessMonitor to be able to attach to it? Best regards |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
No, the "DebuggerThreadSimple" class does not support that behaviour - if you provide it with a process name as well as a start command, it will always attempt to first start a new target instance as opposed to looking for an existing process to attach to. As another shameless plug, I've developed my own debugger thread here, which allows you to do that however. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your fast reply! I will definitely try it. |
Beta Was this translation helpful? Give feedback.
-
Another problem I am stumbling upon is that the process I am monitoring is part of a software framework running multiple processes. Somewhere in this framework there seems to be a watchdog, always restarting the target service as soon as it is stopped. Do you have an idea how to continuously look out for that process being spawned by the framework instead of spawning it with the ProcessMonitor after a crash? |
Beta Was this translation helpful? Give feedback.
No, the "DebuggerThreadSimple" class does not support that behaviour - if you provide it with a process name as well as a start command, it will always attempt to first start a new target instance as opposed to looking for an existing process to attach to.
As another shameless plug, I've developed my own debugger thread here, which allows you to do that however.