Vscode: Source file links not clickable in integrated terminal

Created on 5 Sep 2018  路  7Comments  路  Source: microsoft/vscode

54788 was closed but the issue is still persisting. I've narrowed it down to paths containing a space:

unbenannt-1

What makes my problem so weird is that the displayed path does not need to contain a space for the link detection to fail. If I work in C:\very long path with a space somewhere\src\lib\foo.ts, a TypeScript error containing src\lib\foo.ts does not get a link. If I instead work in C:\some_path_with_no_space\src\lib\foo.ts the link appears.

*duplicate integrated-terminal

Most helpful comment

Prior to today's automatic update I didn't have any problem with source links from clang-cl. However, after today's update no source paths it outputs are linked at all. The problem is not limited to file names with spaces in my case.

Update: After fiddling a bit I have found that in my case it was caused by a new incompatibility with clang's relative paths. Inserting ${workspaceRoot}/ in my build command's paths caused clang to insert the full path into its error sources, and this full path gets properly linked with vs. This is okay as a workaround but really clutters up the output, and like above this only works if there are no spaces in the full path.

All 7 comments

Prior to today's automatic update I didn't have any problem with source links from clang-cl. However, after today's update no source paths it outputs are linked at all. The problem is not limited to file names with spaces in my case.

Update: After fiddling a bit I have found that in my case it was caused by a new incompatibility with clang's relative paths. Inserting ${workspaceRoot}/ in my build command's paths caused clang to insert the full path into its error sources, and this full path gets properly linked with vs. This is okay as a workaround but really clutters up the output, and like above this only works if there are no spaces in the full path.

I'm having the same problem in High Sierra and now I reckon that the space is just one way to trigger a validation bug. Just as a guess, .\src\lib\foo.ts instead of the absolute path should be enough.

To repro I created a new workspace and disabled all extensions. For reference, ${workspaceFolder}:

$ pwd
/Users/schmamps/vscode-term/

These valid paths are clickable.

$ echo "/Users/schmamps/vscode-term/exists.py:1"
/Users/schmamps/vscode-term/exists.py:1

$ echo "./exists.py:1"
./exists.py:1

This valid path is not clickable:

$ echo "exists.py:1"
exists.py:1

Invalid paths of any kind are not.

$ echo "/Users/schmamps/vscode-term/nonexistent.py:1"
/Users/schmamps/vscode-term/does_not_exist.py:1

$ echo "./does_not_exist.py:1"
./does_not_exist.py:1

If I am incorrect for believing that dotless relative paths are valid, then some sub-component of vscode only just started to enforce it.

I have the same problem on mac OS 10.13.6

I have the same problem on win10 (terminal is bash/zsh from Ubuntu), I try to use full path but still cannot link to source file

also broken on Ubuntu 16.04 64bit - absolute paths work though
downgrade to 1.26.1 restores behaviour

Also having this problem but not limited to spaces with these specs:

Version: 1.27.1 (system setup)
Commit: 5944e81f3c46a3938a82c701f96d7a59b074cfdc
Date: 2018-09-06T09:21:18.328Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Was this page helpful?
0 / 5 - 0 ratings