Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

${file} resolves to output window file #108619

Closed
WardenGnaw opened this issue Oct 13, 2020 · 4 comments
Closed

${file} resolves to output window file #108619

WardenGnaw opened this issue Oct 13, 2020 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@WardenGnaw
Copy link
Member

Issue Type: Bug

${file} is resolving to extension-output-#5 instead of actual selected file.

This is due to our resolveDebugConfiguration function calling vscode.window.createOutputChannel(...).show() then it calls the prelaunchtask which references ${file}.

We have a workaround to write to the output channel and not show it.

VS Code version: Code 1.50.0 (93c2f0f, 2020-10-07T06:10:52.432Z)
OS version: Windows_NT x64 10.0.19041
Remote OS version: Linux x64 4.4.0-19041-Microsoft

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 x 3000)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 63.85GB (40.87GB free)
Process Argv --crash-reporter-id 89ad4c69-aa25-4a98-9f44-ef26e847bfb1
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-20.04
OS Linux x64 4.4.0-19041-Microsoft
CPUs Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 x 3000)
Memory (System) 63.85GB (40.87GB free)
VM 0%
Extensions (5)
Extension Author (truncated) Version
vscode-docker ms- 1.6.0
remote-ssh ms- 0.55.0
remote-ssh-edit ms- 0.55.0
remote-wsl ms- 0.50.0
cpptools ms- 1.0.1
@isidorn
Copy link
Contributor

isidorn commented Oct 20, 2020

I also find this a bit strange since the variable resolver calls the editorService.activeEditor here when resolving the ${file}

So it might be the defintiion of the editorService that we allow activeEditor to point to the output.
@bpasero might know exactly
Forwarding to @alexr00 since she owns configuration resolving.

@isidorn isidorn assigned alexr00 and unassigned isidorn Oct 20, 2020
@bpasero
Copy link
Member

bpasero commented Oct 21, 2020

@isidorn the output channel can never be editorService.activeEditor, there must be other code that ends up using it. If you can reproduce that editorService.activeEditor returns an output channel, please file an important bug to me.

@alexr00
Copy link
Member

alexr00 commented Oct 21, 2020

Duplicate of #95423

@bpasero
ExtHostDocumentsAndEditors will return non-code editors as the activeEditor.

getFilePath: (): string | undefined => {
const activeEditor = editorService.activeEditor();
if (activeEditor) {
return path.normalize(activeEditor.document.uri.fsPath);
}
return undefined;
},

@alexr00 alexr00 closed this as completed Oct 21, 2020
@alexr00 alexr00 added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 21, 2020
@bpasero
Copy link
Member

bpasero commented Oct 21, 2020

Ah ok sorry, I thought this is about IEditorService in the workbench. I have no ownership of the ext-host equivalent, but it is a bit misleading that we call them the same.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants