-
Notifications
You must be signed in to change notification settings - Fork 852
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
docs: add vs code debugging section with headless delve #1187
base: main
Are you sure you want to change the base?
Conversation
Nice, however you may want to adjust this to include how to pass command line arguments to the program being debugged. Took me 15-20 min or so to work this out, not having used dlv in this manner before. I think specifically point out that
|
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.
Perhaps in DEBUG.md
Wdyt @charmbracelet/everyone?
I think is better in a DEBUG file, so we can also add more information not only for VS Code users but other editors/stacks |
Actually, I wasn't aware we already have a debugging section on README, then I think is ok to go ahead as long we mind if it expand/gets bigger we should dedicate a debug area in the repo |
Personally, I think it makes sense to link to their own editor's documentation instead of re-writing it in our own words then having to maintain that copy. We can link to the VS Code documentation on how to connect to a headless delve server https://github.com/golang/vscode-go/blob/master/docs/debugging.md#remote-debugging I don't have any strong opinions about keeping it in the README vs DEBUG.md file |
@@ -283,6 +283,33 @@ for backwards compatibility reasons. However, delve recommends using version 2 | |||
for all new development and some clients may no longer work with version 1. | |||
For more information, see the [Delve documentation](https://github.com/go-delve/delve/tree/master/Documentation/api). | |||
|
|||
### Debugging with Delve using VS Code |
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.
### Debugging with Delve using VS Code | |
#### Connecting to a headless session | |
You can connect your editor's debugger to a headless delve session. This is known as remote debugging. | |
- [VSCode - Remote Debugging](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#remote-debugging) |
I think we could just do this and remove the other instructions below
In the current README.md, the debugging section lacks the instructions on how to setup VS Code with delve in headless mode to debug bubble tea apps.
I have added step by step instructions on how to do this, believing it will be a great help for new developers on how to debug CLI apps.
Kindly review & approve it.
Thanks - Imran