Skip to content

Missing external sources when debugging with dlv #1708

@prestonvanloon

Description

@prestonvanloon

To reproduce:

  1. Have some bazel project with an external library provided by go_repository.
  2. Build with bazel build -c dbg //program:main
  3. Execute dlv exec bazel-bin/program/linux_amd64_debug/main
  4. Set a breakpoint in the external library b github.com/abc/lib.(*Foo).Bar
  5. Enter c to continue the execution until the breakpoint is hit
  6. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggotoolsSupport for editors, analysis, and refactoring tools

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions