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

Normalizes the program path that is stored in Delve object. #1131

Merged
merged 1 commit into from
Aug 9, 2017

Conversation

Craig-Stone
Copy link
Contributor

The Delve this.program is compared against a normalizedPath in the this.toDebuggerPath() function and it needs to be noralized before this is done otherwise it will end up returning the wrong path for the remote file. This can be seen when running a Windows 10 64bit host trying to perform remote debugging to an Ubuntu server which requires a remote path. The non-normalized program path has a lower case for the drive letter returned from the launch configuration ("program": "${fileDirname}") and the normalized program path has a capital letter for the drive. This difference causes the replacement of the local directory path to fail, so the remotePath sent to the remote debugger is incorrect thus preventing break points from being set correctly.

The Delve this.program is compared against a normalizedPath in the this.toDebuggerPath() function and it needs to be noralized before this is done otherwise it will end up returning the wrong path for the remote file.  This can be seen when running a Windows 10 64bit host trying to perform remote debugging to an Ubuntu server which requires a remote path.  The non-normalized program path has a lower case for the drive letter returned in ("program": "${fileDirname}") and the normalized program path has a capital letter for the drive.  This difference causes the replacement of the local directory path to fail,  so the remotePath sent to the remote debugger is incorrect thus preventing break points from being set correctly.
@msftclas
Copy link

msftclas commented Aug 4, 2017

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@ramya-rao-a ramya-rao-a merged commit 09404dc into microsoft:master Aug 9, 2017
@ramya-rao-a
Copy link
Contributor

Thanks for the fix @Craig-Stone!

@ramya-rao-a
Copy link
Contributor

This fix is now out in the latest update to the Go extension 0.6.64

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

Successfully merging this pull request may close these issues.

3 participants