We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc8c610 commit 50e1f14Copy full SHA for 50e1f14
1 file changed
src/VSCode.DebugAdapter/DebugeeProcess.cs
@@ -87,7 +87,16 @@ public void Start()
87
public void InitAttached()
88
{
89
var pid = _debugger.GetProcessId();
90
- _process = Process.GetProcessById(pid);
+
91
+ try
92
+ {
93
+ _process = Process.GetProcessById(pid);
94
+ }
95
+ catch (ArgumentException ex) when (ex.Message.Contains("is not running"))
96
97
+ _process = Process.GetCurrentProcess();
98
99
100
_attachMode = true;
101
_process.EnableRaisingEvents = true;
102
_process.Exited += Process_Exited;
0 commit comments