Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Canonicalize paths to lowercase in Windows #341

Merged
merged 1 commit into from
Jul 17, 2018

Conversation

digeff
Copy link
Contributor

@digeff digeff commented Jul 16, 2018

Canonicalize paths to lowercase in Windows

In some cases the webroot that VS sends doesn't match the case of the file paths that VS sends for the breakpoints: ("c:\users\username\source\repos\WebApplication77\WebApplication77" vs "c:\Users\username\source\repos\WebApplication77\WebApplication77\Scripts\bootstrap.js"). That results in breakpoints not being hit in those cases.

@roblourens
Copy link
Member

This isn't handled by the code we already have for this? https://github.com/Microsoft/vscode-chrome-debug-core/blob/master/src/chrome/chromeDebugAdapter.ts#L2873

And this needs to be VS-only like the other code.

@digeff
Copy link
Contributor Author

digeff commented Jul 16, 2018

I can reproduce this issue with the latest version of the debug adapter, so the existing code is not handling this case.
I can reproduce this on VS Code by hardcoding the "webRoot" parameter manually and using the wrong case, so I think we should make this fix for both VS and VS Code.

@roblourens
Copy link
Member

We already have a VS-specific fix, we need to find the missing scenario and use that same fix. If someone uses the wrong case in VS Code, then they should fix that.

@digeff
Copy link
Contributor Author

digeff commented Jul 16, 2018

By same fix: Do you mean enabling this code only if _caseSensitivePaths is set to true?

@roblourens
Copy link
Member

Yeah, but you shouldn't have to check that inside this utils method. The existing fix should handle all paths coming and going from the adapter.

@digeff
Copy link
Contributor Author

digeff commented Jul 16, 2018

What is your concern with putting this logic inside the utils method?

My concern with trying to handle all paths coming and going from the adapter is that if we miss one, then we have a bug. It seems more reliable to me to put this logic on the util method, so even if we add new ways (or miss old ones) for paths to come and go from the debug adapter, everything will work fine.

@roblourens roblourens changed the base branch from master to VS/15.8 July 17, 2018 21:11
@roblourens roblourens merged commit 8ecfc50 into microsoft:VS/15.8 Jul 17, 2018
@roblourens roblourens added this to the July 2018 milestone Aug 3, 2018
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.

2 participants