Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

When hitting Stop during Debug, it does not kill debug process #834

Closed
kisPocok opened this issue Mar 3, 2017 · 3 comments
Closed

When hitting Stop during Debug, it does not kill debug process #834

kisPocok opened this issue Mar 3, 2017 · 3 comments
Assignees
Labels

Comments

@kisPocok
Copy link

kisPocok commented Mar 3, 2017

"debug" process is not being killed after Stop button is pressed. I have to kill it manually.

vscode 1.10.1
go extension 0.6.54
macOS 10.12.3

Reference #438

@ghost
Copy link

ghost commented Mar 3, 2017

Same problem here (on Linux).
I assume it stems from having multiple goroutines being executed (a server running) and as thus a simple SIGTERM is not enough.

Just force close the process by sending a SIGKILL.

If you are debugging your application and are clicking on the Close button the expected behaviour should be a SIGKILL (-9) and not a SIGTERM (-15).

Edit:

I just had a look at the terminateProcess.sh (which I assume gets called when clicking on Stop?).
kill -9 $1 > /dev/null 2>&1
I am heavily surprised. When trying to kill the process through VSCode (aka clicking on the Stop button in Debug mode) literally nothing happens. If I run kill -9 $pid from my terminal the whole process ends immediately. I guess there is some problem with executing the terminalProcess.sh? I can't explain any other way seeing that the debugger should actually send out a SIGKILL which should kill the process instantly.

@ghost
Copy link

ghost commented Mar 3, 2017

So turns out bash/sh cannot parse the file because of Windows line endings (it uses CRLF). Just change the line endings to LF and it works perfectly again on Linux (and should as well on Mac obviously).

@ramya-rao-a
Copy link
Contributor

This should be fixed with the latest version 0.6.55

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants