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

Closed
daviwil opened this Issue Dec 27, 2015 · 4 comments

Projects

None yet

3 participants

@daviwil
Member
daviwil commented Dec 27, 2015

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.

@daviwil daviwil referenced this issue in PowerShell/vscode-powershell Dec 27, 2015
@daviwil daviwil Update example launch.json a613d5e
@bpasero bpasero added this to the Backlog milestone Dec 28, 2015
@bpasero
Member
bpasero commented Dec 28, 2015

@isidorn fyi

@isidorn isidorn added bug and removed feature-request labels Dec 28, 2015
@isidorn isidorn self-assigned this Dec 28, 2015
@isidorn isidorn closed this in b6393b9 Dec 28, 2015
@isidorn
Contributor
isidorn commented Dec 28, 2015

Nice catch. I was doing some ovewriting of cached configurations in configuraiton service thus getting stale ones.

@isidorn isidorn assigned bpasero and unassigned isidorn Dec 28, 2015
@daviwil
Member
daviwil commented Dec 29, 2015

Awesome, thanks Isidor! This will be really helpful.

@bpasero bpasero modified the milestone: Jan 2016, Backlog Jan 26, 2016
@bpasero
Member
bpasero commented Jan 28, 2016

Nice, I like ${file}

@bpasero bpasero added the verified label Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment