PowerShell / PowerShell/PowerShellEditorServices
Debugger relies on case-insensitive paths
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 767
- Forks
- 266
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 1
Description
This odd behavior was first noticed in a test:
It turns out that the URIs and paths we're receiving "over the wire" (in the raw LSP requests themselves) are mostly cased correctly, with the exception of driver letters being lower case. Because of this, when https://github.com/PowerShell/PowerShell/issues/20057 was temporarily fixed by making PowerShell's debugger's _pendingBreakpoints collection case-sensitive, it broke the extension's debugger https://github.com/PowerShell/vscode-powershell/issues/4668.
We need to figure out why those drive letters are coming over lower-case, as the rest of the Windows ecosystem doesn't expect drive letters to be lowercase. Worst case scenario is that we fix the casing as we handle the request, but I'd like to see where the issue originates (thinking perhaps in the LSP client library...) and try to fix it there. Though technically c:/ is valid, and it's mostly PowerShell that's caring about it not being C:/.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs around lines 140-141 and reproduce the casing behavior. Trace how raw LSP requests and drive-letter paths are handled, including the referenced LSP client library. Done means the origin of the lowercase drive letters is identified and the debugger behavior is covered by a regression test or an appropriate fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell, vscode
- Domain
- devtools, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100