To reproduce:
- Have some bazel project with an external library provided by go_repository.
- Build with
bazel build -c dbg //program:main
- Execute
dlv exec bazel-bin/program/linux_amd64_debug/main
- Set a breakpoint in the external library
b github.com/abc/lib.(*Foo).Bar
- Enter
c to continue the execution until the breakpoint is hit
- List the current source code with
ls and see Command failed: open external/github.com/abc/lib/foo.go: no such file or directory
Is there any workaround besides not using bazel to build the debug binary?
To reproduce:
bazel build -c dbg //program:maindlv exec bazel-bin/program/linux_amd64_debug/mainb github.com/abc/lib.(*Foo).Barcto continue the execution until the breakpoint is hitlsand seeCommand failed: open external/github.com/abc/lib/foo.go: no such file or directoryIs there any workaround besides not using bazel to build the debug binary?