MCPcopy Create free account
hub / github.com/microsoft/debugpy / kill

Function kill

src/debugpy/launcher/debuggee.py:178–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176
177
178def kill():
179 if process is None:
180 return
181
182 try:
183 if process.poll() is None:
184 log.info("Killing {0}", describe())
185 # Clean up the process tree
186 if sys.platform == "win32":
187 # On Windows, kill the job object.
188 winapi.kernel32.TerminateJobObject(job_handle, 0)
189 else:
190 # On POSIX, kill the debuggee's process group.
191 os.killpg(process.pid, signal.SIGKILL)
192 except Exception:
193 log.swallow_exception("Failed to kill {0}", describe())
194
195
196def wait_for_exit():

Callers

nothing calls this directly

Calls 2

describeFunction · 0.85
infoMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…