forked from Mirrors/bubbletea
docs: add delve instructions
This commit is contained in:
parent
feeffca0a5
commit
a4ac134e0f
17
README.md
17
README.md
|
@ -255,6 +255,23 @@ there are [Go Docs][docs].
|
||||||
[examples]: http://github.com/charmbracelet/bubbletea/tree/master/examples
|
[examples]: http://github.com/charmbracelet/bubbletea/tree/master/examples
|
||||||
[docs]: https://pkg.go.dev/github.com/charmbracelet/bubbletea?tab=doc
|
[docs]: https://pkg.go.dev/github.com/charmbracelet/bubbletea?tab=doc
|
||||||
|
|
||||||
|
## Debugging with Delve
|
||||||
|
|
||||||
|
Since Bubble Tea apps assume control of of stdin and stdout, you’ll need to run
|
||||||
|
delve in headless mode and then connect to it:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Start the debugger
|
||||||
|
$ dlv debug --headless .
|
||||||
|
API server listening at: 127.0.0.1:34241
|
||||||
|
|
||||||
|
# Connect to it from another terminal
|
||||||
|
$ dlv connect 127.0.0.1:34241
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that the default port used will vary on your system and per run, so
|
||||||
|
actually watch out what address the first `dlv` run tells you to connect to.
|
||||||
|
|
||||||
## Libraries we use with Bubble Tea
|
## Libraries we use with Bubble Tea
|
||||||
|
|
||||||
* [Bubbles][bubbles]: Common Bubble Tea components such as text inputs, viewports, spinners and so on
|
* [Bubbles][bubbles]: Common Bubble Tea components such as text inputs, viewports, spinners and so on
|
||||||
|
|
Loading…
Reference in New Issue