Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Can't set breakpoins in libraries when remote debugging #689

Closed
f0zi opened this issue Dec 15, 2016 · 5 comments
Closed

Can't set breakpoins in libraries when remote debugging #689

f0zi opened this issue Dec 15, 2016 · 5 comments

Comments

@f0zi
Copy link
Contributor

f0zi commented Dec 15, 2016

  • What version of Delve are you using (dlv version)?
    • 0.11.0-alpha on both Windows + Linux
  • What version of Go are you using? (go version)?
    • go version go1.7 windows/amd64
    • go version go1.7.4 linux/amd64
  • What operating system and processor architecture are you using?
    • Windows 10 64 bit running VS code
    • Any linux (tested with Ubuntu 16.4) running the test subject & headless dlv
  • What did you do?
    • At debug time, add/remove breakpoint in a library file
  • What did you expect to see?
    • Breakpoint accepted and debugee paused when hit
  • What did you see instead?
    • Unverified breakpoint, breakpoint not set.

In my launch.json I have the remotePath set to /home/fozi/go/src/test/main, If I set it to anything else (e.g. opening the test folder and remove /main) none of the breakpoints work. The library I tested with is in /home/fozi/go/src/test/lib, but It would be nice if this would work at the very least in anything under $GOPATH/src (assuming it's reachable) including vendor folders. Windows (and VS Code) accessed these files on a samba share so the paths look like \\vmmachine\fozi\go\src\test\main.

I tried this in dlv command line mode directly and it seems to work fine. I think it's simply that the file name translation needs to be more sophisticated.

@f0zi
Copy link
Contributor Author

f0zi commented Jan 19, 2017

Attaching a diff that solves that for me.

<edit: removed: use code below>

Note: I did findPathSeperator because I often have something like "program": "${workspaceRoot}/test" in my launch.json which gives the wrong results on Windows.

@f0zi
Copy link
Contributor Author

f0zi commented Jan 23, 2017

Use this instead, fixed "completely different" case:

goDebug.ts.diff.txt

@ramya-rao-a
Copy link
Contributor

@f0zi Can you submit a PR with details on the problem you are trying to solve?
cc @roblourens

@ramya-rao-a
Copy link
Contributor

Fixed by #742

@ramya-rao-a
Copy link
Contributor

Fixed in the latest update (0.6.54) to the Go extension.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants