[BUG]Unable to perform single-step debugging
wulling1024 opened this issue · comments
Please answer the following before submitting your issue:
Note: Please include any substantial examples (debug session output,
stacktraces, etc) as linked gists.
If this is about source listing not showing up (or breakpoints not being
accepted) while running in a container please read our
FAQ
first.
- What version of Delve are you using (
dlv version
)?
- What version of Go are you using? (
go version
)?
- What operating system and processor architecture are you using?
- What did you do?
(1: My editor is VSCODE, and I use dlv for single-step debugging of golang projects.
(2: The startup command isdlv dap --check-go-version=false --log=true --log-output=debugger --listen=127.0.0.1:51354 --log-dest=3 from xxxx DAP server listening at: 127.0.0.1:51354
There is no problem when the program starts
(3: There is no problem when the program starts.
vscode version:
Version: 1.85.1
Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
Date: 2023-12-13T09:48:06.308Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin x64 23.2.0
@aarzilli master, can you help to check it?
Did you just run the program under delve and did nothing else? Can you reproduce this using the command line UI of delve (without dap)?
Did you just run the program under delve and did nothing else?
yes. I started debugging using vscode. My configuration information is as follows:
"go.delveConfig": {
"dlvFlags": [
"--check-go-version=false",
],
"showLog": true,
"debugAdapter": "dlv-dap",
"apiVersion": 2
},
Can you reproduce this using the command line UI of delve (without dap)
can reproduce.
start command: dlv exec --check-go-version=false --api-version=2 ./main
Recently I did an upgrade to the macos version, I don’t know if it’s relevant.
@aarzilli The program will also terminate when a breakpoint is encountered
But this is a completely different error from the one on the first post.
maybe it's just the same as displaying information.
the first post it is sent is the 'vscode debug console'.
dlv cmd is just a short message.
The key to the current two is that the program is terminated when a breakpoint is encountered.
I tried lowering the version to '1.8.3', but the problem still persists
No in the first screenshot the target program is crashing, in the second one debugserver isn't working. Also:
The key to the current two is that the program is terminated when a breakpoint is encountered.
did you set a breakpoint in the second example? I just see continue
in the screenshot.
I followed this process again:
1、start command: dlv debug --check-go-version=false app/main.go
2、use continue
to startup project. because this is a Gin http service
3、add breakpoint
4、use postman to request http://127.0.0.1:8888/api/health_check/
5、continue
we got error and the program is crashing..
hi @aarzilli. thank you very much, my problem is solved. respect