Skip to content

Open file links from console or compile output #98593

Closed
@hensz

Description

@hensz
  • VSCode Version:1.45.1
  • OS Version: Windows 10.0.18363

Hi!

When I either do a compilation in the integrated terminal or with a build task and I click on a file "link" for an error or a warning, the file is opened differently than when I open it from the Explorer pane.

Files opened from the Explorer pane are displayed with a relative file path (relative to the workspace root I assume). However, since the file names in compiler output have absolute paths (at least in my case, not sure of this can be changed somehow) the file is also opened with absolute file path. My assumption is that now VSCode "thinks" that this is a different file than the one opened from Explorer. Therefore the file is opened twice, which causes quite some confusion, especially both variants can be edited simultaneously, eventually resulting in conflicts during saving the second one.

Also the search is affected: If a file was opened from the compile output each search results in that file are displayed twice, once in the regular list of results, and once under "Other files".

Steps to Reproduce:

  1. Open a file from the Explorer, create a compile error
  2. Compile this file from VSCode
  3. Click the link to the file in the compile output
  4. Now the file is opened twice.

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions