-
Notifications
You must be signed in to change notification settings - Fork 646
Support attaching and detaching from remote debug server without killing the process #1609
Comments
A similar issue: if you launch a remote debug session and the headless server isn't up it seems that the debug task hangs forever waiting to connect I thought that the client connection had a defined timeout, although it may be missing something |
@radu-matei We do a halt + restart in that case and do not kill any process explicitly. I dont know why we went with halt + restart instead of detach without killing, as that was before my time. Sending a detach command needs halting as well, so we can look into halt + detach instead of halt + restart Thoughts? |
Hi @ramya-rao-a, is there any update on this issue? It would be supper handy if I VS Code can accept input from package main
import "fmt"
func main() {
fmt.Println("What's your name?")
var s string
fmt.Scanln(&s)
fmt.Printf("Hello, %s", s)
} |
In order to send a Detach request, we need to first send a Halt request. See this note on gracefully ending the debug session in delve @olegburov Your scenario is being tracked in #219. Please subscribe to that issue for further updates |
Since we can't really send the detach request without halting the dlv process first, there is nothing much we can do for this issue. Therefore, I am closing it. We will continue to work to on #1599 |
Related: #1599 (comment)
If you have a long running process and start a
dlv attach --headless
session, then you point VS Code to that host and have a debug session, after you stop debugging from VS Code you would expect the remote process to continue running - but the extension actually sends a Halt request to the debug server.It would be extremely helpful (for this and for other extensions using this Go debugger) to support gracefully detaching from remote processes without killing them.
The text was updated successfully, but these errors were encountered: