-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
cmd/dlv: print out message with stack trace when breakpoint is hit but has no waiting client #3632
base: master
Are you sure you want to change the base?
cmd/dlv: print out message with stack trace when breakpoint is hit but has no waiting client #3632
Conversation
c12a582
to
66a3316
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think that needing this option is a strong symptom that there is something very wrong with your development environment. In the context of running something locally during development you would want the program to stop at a panic to examine why the panic happened.
In the context of running the program in production having a debugger attached to it constantly is a security risk.
I'm also inclined to agree with @aarzilli, however I am familiar with the workflow described in the associated issue, and in that context I could see the benefit to the actual crash being apparent and not silenced by Delve by virtue of waiting on user input to produce the panic. My initial feedback is I am against wholesale deletion of these breakpoints, I think it would be better to actually disable them, so they can be re-enabled later without having to know the specifics of the runtime. |
We could also print something if we stop at a breakpoint while there isn't a connected client. |
That's good too. Might even be nice to print the traceback and panic message automatically when hitting the panic breakpoints anyways, to be honest. |
I agree with you. This option is needed in our orgs because not everyone are familiar with the debugger and we want to have a setup that is practical and convenient for everyone.
I tried this one actually, instead of deleting them I tried to toggling off those breakpoints, but it's not possible to do that through the API because we will reject any request that has
Ideally yeah this is what I'm looking for, but it seems to be a bit tricky to pull off. Let me see if i can find a way to do this. |
One way to do it would be like this:
|
66a3316
to
c29cb69
Compare
oh ya i have implemented this in this PR but in a different fashion.
Initially im thinking to move the unhandled panic breakpoint to somewhere after we print out the message but it's going to be a bit tricky to make it sure it works for older (and future) go versions so I'm going with implementing this on the server side. Hope that's acceptable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this was a leftover comment)
Hey @fatanugraha there has been no update on this PR in a month, are you still planning to work on this? |
Hi @derekparker I have plans to pick this up again in 1-2 weeks from now, but if anyone else wants to work on this issue I'm also okay with that. Sorry for the delay :( |
No worries, and no rush! Just wanted to check in. |
@fatanugraha would you like some additional hands on this? |
cf2069e
to
c9531a9
Compare
ac5dd6c
to
593758a
Compare
Sorry folks for the long delay, life got in the way 😅 |
9a37b4b
to
ae15db6
Compare
ae15db6
to
6667b65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is good, except for a couple of changes that may have been caused by a merge conflict. Also could you remove all the extra newlines that you have added at various points.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you.
Great work @fatanugraha 🙏 |
Print out a message and stack trace to the stderr when we hit a breakpoint and the client that sends the continue command has disconnected.
Fixes #3469