Justin Grote
Justin Grote
@TylerLeonhardt perhaps it is as simple as appending `if (-not $PSScriptRoot) {$PSScriptRoot = MyDocumentPathFetchedFromVSCode}` to the text fetched from the document? https://github.com/PowerShell/vscode-powershell/blob/495c7d9b41dc8d96503291d4e7b9bdcb71dfc8d0/src/features/Console.ts#L240-L242
@simonsabin well yes I'm just using that as an example because the actual variable would have to be programatically injected by vscode extension because the editor services has no idea...
VSCode saves them in 'AppData\Roaming\Code - Insiders\Backups' but it's not a .ps1 file and probably not relevant to what someone is trying to do if referencing $PSScriptRoot, which is why...
@vadhbka this variable is dynamically populated depending on the context, you can't just run it at the command line, if it's present in a script it will present what you...
@vadhbka thanks for the update! I agree with @CarlosAndreuLlaneras because this makes your script immune to differences in how it is invoked (dotsource vs direct run). This happens in PowerShell...
@SydneyhSmith @TylerLeonhardt EDIT: Can Reproduce now: 
@lesterm5150 it's definitely noted as needed but the current highest priority is getting the extension stabilized with the new revamped internal engine to the point it's good for a stable...
We would want to make sure "go to reference", etc. would still work on an ad hoc fashion, albeit probably slower on first invocation. An ideal implementation would use file...
"We could use a combination of file system watchers and caches to possibly increase perf here." Looks like Tyler is of same thinking as me :)