Skip to content
Advertisement

VSCode kill running processes

I have been using Python debug and LLDB attach debug since I have code in Python and C++

I have run this multiple times. It looks like everytime there is an exception in the middle of debugging, the process doesn’t get killed.

As a result, now after multiple runs, when I try to use LLDB Attach debug it shows multiple instances of the same file being run

Unable to know which is the latest process

Also how to kill processes that haven’t terminated.

For reference, here’s an image enter image description here

Advertisement

Answer

Those processes can probably be termed as ghost processes. Those are caused from the previous run when one does not detach the lldb from it.

Manually searching for the process ID of those and killing them solved the problem.

List python related processes

ps -ef | grep python

Killing the ones you identify as ghost.

kill -9 <process-id>
Advertisement