You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project that uses UniFFI and uniffi-bindgen-go to generate Go bindings for a Rust library. It appears that any unit tests that import these bindings cause the debugger not to start. Instead, it shows this error:
Failed to launch: could not launch process: could not read debug info (decoding dwarf section info at offset 0x0: too short) and could not read go symbol table (could not find rodata struct member)
Unfortunately, I don't have a simple example Rust/Go library that I can share; if that would help, I can try to put together a minimal example some time in the next few weeks.
I have built and linked the Rust bindings in both debug and release mode, but this does not seem to make a difference, and I also don't need the debugger to work across the FFI boundary, so I wouldn't expect the Rust debug symbols to matter.
This is the CGO link declaration (bindings is the name of the Rust library):
Using dlv test on the command line seems to work fine:
dlv test --build-flags="-tags=unit" ./queue/policy/ -- -test.run <testname>
Steps to reproduce the behavior:
I see this no matter how I launch the debugger (i.e. from the "Run and Debug" panel, from the test UI, or using the "Go: Debug Test At Cursor" command).
@hyangah Thank you; that worked! (It took a few tries because apparently the ~/sdk/.../go version of Go was separate from everything on my PATH, so I have no idea why VSCode was using that or how it got there. 🤨)
Sorry for opening a duplicate; #3547 is almost certainly the same issue. I looked for issues with cgo but somehow didn't find that one.
What version of Go, VS Code & VS Code Go extension are you using?
Version Information
go version
to get version of Go from the VS Code integrated terminal.gopls -v version
to get version of Gopls from the VS Code integrated terminal.code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders.38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
arm64
Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) >
Go: Locate Configured Go Tools
command.Share the Go related settings you have added/edited
Launch profile:
Describe the bug
I have a project that uses UniFFI and uniffi-bindgen-go to generate Go bindings for a Rust library. It appears that any unit tests that import these bindings cause the debugger not to start. Instead, it shows this error:
Unfortunately, I don't have a simple example Rust/Go library that I can share; if that would help, I can try to put together a minimal example some time in the next few weeks.
I have built and linked the Rust bindings in both debug and release mode, but this does not seem to make a difference, and I also don't need the debugger to work across the FFI boundary, so I wouldn't expect the Rust debug symbols to matter.
This is the CGO link declaration (
bindings
is the name of the Rust library):Using
dlv test
on the command line seems to work fine:Steps to reproduce the behavior:
I see this no matter how I launch the debugger (i.e. from the "Run and Debug" panel, from the test UI, or using the "Go: Debug Test At Cursor" command).
Screenshots or recordings
Debug log (with
dap,debugger,gdbwire,lldbout
logging):dlv_debug.txt
The text was updated successfully, but these errors were encountered: