Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Debugger could trigger breakpoint in wrong script on case sensitive filesystems #20057

Copy link
Copy link
@fflaten

Description

@fflaten
Issue body actions

Prerequisites

Steps to reproduce

Run in linux:

"'Hello from LOWERCASE file'" > file.ps1
"'Hello from UPPERCASE file'" > FILE.ps1

# Set breakpoint on lowercase file
Set-PSBreakpoint -Script file.ps1 -Line 1

# Invoke uppercase file
& ./FILE.ps1

# Enters debugger (issue)
Entering debug mode. Use h or ? for help. 

Hit Line breakpoint on '/tmp/file.ps1:1'

At /tmp/FILE.ps1:1 char:1
+ 'Hello from UPPERCASE file'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expected behavior

Does not enter debugger as the breakpoint is set for the lowercased file only.

See #20046 (comment).
VSCode extension relies on the current behavior atm because it sets breakpoint using a lowercase drive letter on Windows.

Actual behavior

Enters debugger because breakpoint matches script using OrdinalIgnoreCase string comparison.

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.6
PSEdition                      Core
GitCommitId                    7.3.6
OS                             Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productOS-LinuxResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtimeWG-ReviewedA Working Group has reviewed this and made a recommendationA Working Group has reviewed this and made a recommendation

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

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.