Suzy Mueller submitted this change.
docs/debugging.md: add FAQ section for next while nexting
Add documentation for the behavior of the debugger when trying to
step while a step command is active.
Change-Id: Ib9a8f0e0471335c889b42dc18e959568e1dbbb86
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/347429
Trust: Suzy Mueller <suz...@golang.org>
Trust: Hyang-Ah Hana Kim <hya...@gmail.com>
Run-TryBot: Suzy Mueller <suz...@golang.org>
TryBot-Result: kokoro <noreply...@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
---
M docs/debugging.md
A docs/images/disablebps.png
A docs/images/invalidCommandExceptionInfo.png
3 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/docs/debugging.md b/docs/debugging.md
index 7436041..9d27a9b 100644
--- a/docs/debugging.md
+++ b/docs/debugging.md
@@ -485,6 +485,22 @@
Please [open an issue](https://github.com/golang/vscode-go/issues/new) if this is not sufficient for your use case or if you have any additional feedback.
+### Why does my debug session have an `invalid command` error when I try to step?
+
+When stepping through a program on a particular goroutine, the debugger will make sure that the step is completed, even when interrupted by events on a different goroutine. If a breakpoint is hit on a different goroutine, the debug adapter will stop the program execution to allow you to inspect the state, even though the step request is still active.
+
+If you attempt to make another step request you will get an `invalid command` error.
+
+<p align="center"><img src="images/invalidCommandExceptionInfo.png" alt="Disable breakpoints from the Breakpoints context menu" width="75%"> </p>
+
+
+Use `Continue` to resume program execution.
+
+If you do not want the step request to be interrupted, you can disable all breakpoints from VS Code from the context menu in the `Breakpoints` view.
+
+<p align="center"><img src="images/disablebps.png" alt="Disable breakpoints from the Breakpoints context menu" width="75%"> </p>
+
+
[Delve]: https://github.com/go-delve/delve
[VS Code variables]: https://code.visualstudio.com/docs/editor/variables-reference
[snippets]: https://code.visualstudio.com/docs/editor/userdefinedsnippets
diff --git a/docs/images/disablebps.png b/docs/images/disablebps.png
new file mode 100644
index 0000000..a658540
--- /dev/null
+++ b/docs/images/disablebps.png
Binary files differ
diff --git a/docs/images/invalidCommandExceptionInfo.png b/docs/images/invalidCommandExceptionInfo.png
new file mode 100644
index 0000000..d3a5b51
--- /dev/null
+++ b/docs/images/invalidCommandExceptionInfo.png
Binary files differ
To view, visit change 347429. To unsubscribe, or for help writing mail filters, visit settings.