You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
In addition to #360 I am having a problem where if a go program enters an infinite loop, or in a similar fashion, is http.ListenAndServeing, stopping the debug process fails to properly kill the debug process running.
(http.ListenAndServe() runs a for { /* ... */ } loop under the hood. Apart from the other issue (#360) when I start debugging, it works as expected. The server starts listening and responding to the fact. However, when I press stop (▪) the debugger appears to stop, but the underlying process that the debugger had started, continues to run. I noticed this because when I started debugging again, the program could not bind to the specified port because it was already in use. I checked and found that the previous process was still running.
Note that this issue can be reproduced with a program as simple as:
package main
funcmain() {
for {
}
}
Apparently, the only requirement for reproducing the bug is an infinite loop. Programs that are supposed to exit naturally are not affected (although they don't stop at breakpoints because of #360 but that's another issue).
Here's some other information that may be helpful:
OS: Linux Mint 17.2 (Ubuntu 14.04) VSCode version: 1.7.1 (02611b40b24c9df2726ad8b33f5ef5f67ac30b44) VSCode go version: 0.6.46 Go version: 1.7.3 Delve version: 0.11.0-alpha
The text was updated successfully, but these errors were encountered:
Can confirm, Sending SIGKILL instead of the default SIGTERM here might be a workaround but I'm not sure how important it is to terminate the debug processes gracefully. Might not work if dlv spaws the process in detached mode. Will compiling the extension and test.
In addition to #360 I am having a problem where if a go program enters an infinite loop, or in a similar fashion, is
http.ListenAndServe
ing, stopping the debug process fails to properly kill the debug process running.For example here's a program:
Here's the corresponding launch.json
(
http.ListenAndServe()
runs afor { /* ... */ }
loop under the hood. Apart from the other issue (#360) when I start debugging, it works as expected. The server starts listening and responding to the fact. However, when I press stop (▪) the debugger appears to stop, but the underlying process that the debugger had started, continues to run. I noticed this because when I started debugging again, the program could not bind to the specified port because it was already in use. I checked and found that the previous process was still running.Example:
Note that this issue can be reproduced with a program as simple as:
Apparently, the only requirement for reproducing the bug is an infinite loop. Programs that are supposed to exit naturally are not affected (although they don't stop at breakpoints because of #360 but that's another issue).
Here's some other information that may be helpful:
OS: Linux Mint 17.2 (Ubuntu 14.04)
VSCode version: 1.7.1 (02611b40b24c9df2726ad8b33f5ef5f67ac30b44)
VSCode go version: 0.6.46
Go version: 1.7.3
Delve version: 0.11.0-alpha
The text was updated successfully, but these errors were encountered: