-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default name of output binary causes confusing behavior when delve is run twice from the same directory #3345
Comments
If you can reproduce this (semi)reliably you could reproduce it with |
Thanks so much! I can definitely reproduce this 100% of the time now and finally got some time to run it with the flags you suggested. NOTE: the commands are named tailscale and tailscaled (note the d). This may be related to the problem. Attached are two files. The first one shows the output of dlv tailscaled with those flags, the second is dlv tailscale with those flags. Here is the sequence of actions:
dlv tailscaled switches to tailscale.txt |
Using a fixed path as the default output binary means that executing Delve twice in the same directory will cause the second invocation to overwrite the output binary of the first instance of Delve, making the restart command not work correctly. Fixes go-delve#3345
Using a fixed path as the default output binary means that executing Delve twice in the same directory will cause the second invocation to overwrite the output binary of the first instance of Delve, making the restart command not work correctly. Fixes go-delve#3345
) Using a fixed path as the default output binary means that executing Delve twice in the same directory will cause the second invocation to overwrite the output binary of the first instance of Delve, making the restart command not work correctly. Fixes #3345
Up front: we are using a slightly forked version of Go; feel free to close as WONTFIX but it seems like something that would likely be present with mainline go.
I am running "dlv debug" simultaneously on two processes, one named "tailscale" and one named "tailscaled". Twice today I have restarted dlv, hit "c" to run, and gotten an error message from the binary I am debugging in my OTHER dlv session.
AFAICT, this happens when I kill and restart dlv while the other dlv session is running.
Specific steps:
The "tailscaled" process is running in the first dlv.
The "tailscale" process in the second dlv has run and exited.
I quit the first dlv with "tailscaled" and restart it with exactly the same arguments and source. I type "c" to run it and it is running, waiting for API calls.
In the second dlv, I type "r" to restart the "tailscale" process. I then type "c" to run it.
At this point, I get an error message saying I've passed invalid command line arguments. It's the error message from the code I am debugging in the OTHER dlv session.
If I then quit the first dlv session, restart it with the exact same arguments and source, and type "c", I get an error message from the code I am debugging in the second dlv session.
What version of Delve are you using (
dlv version
)? 1.20.1What version of Go are you using? (
go version
)? go1.20.3-tsddff070 (1.20.3 with some tailscale specific patches)What operating system and processor architecture are you using? MacOS 13.3.1, arm64
What did you do? Quit and restarted dlv while running another dlv session simultaneously, then ran the program.
What did you expect to see? The output from the source code I specified on the command line.
What did you see instead? The output from the source code I specified in the OTHER dlv session currently running.
The text was updated successfully, but these errors were encountered: