Skip to content

${file} variable should change when active editor pane switches to a different file #1667

@daviwil

Description

@daviwil

It appears that the ${file} variable can be used in launch.json configurations to determine the "program" to be run when the user starts the debugger. A couple users of the PowerShell extension have discovered that this variable will have the file path of the first opened file in the workspace. However, if they switch active files this variable does not change, meaning that the debugger will always run that first file. See more discussion here:

PowerShell/vscode-powershell@a613d5e

It would be nice if this variable got updated dynamically so that the user can run the debugger against the currently active file without having to manually edit their launch.json file each time. This is a pretty common practice when developing PowerShell scripts.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions