microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.53k stars 1.56k forks source link

Terminal Window Error Code Link resolver does not work anymore (Strg+Click /Ctrl+Click) to show source of error) #12560

Closed ABuch19 closed 3 months ago

ABuch19 commented 3 months ago

Environment

VS Code version: Code 1.92.1 (https://github.com/microsoft/vscode/commit/eaa41d57266683296de7d118f574d0c2652e1fc4, 2024-08-07T20:16:39.455Z) OS version: Windows_NT x64 10.0.19045 Modes: Remote OS version: Linux x64 6.2.0-37-generic Remote OS version: Linux x64 4.9.0-19-rt-amd64

Bug Summary and Steps to Reproduce

Bug Summary: When compiler errors are shown in VSC's terminal, the "Strg+Click" /"Ctrl+Click" (klick with left mouse botton while hodling the Strg/Ctrl key on the keyboard) does not work anymore. In previous versions the file was opened in editor at the right line and position. (German keyboard: Strg key / English keyboard: Ctrl key)

Steps to reproduce:

  1. compiler logs an error in the terminal, e.g.
    ../../src/modules/my-module.cpp: In destructror:
    ../../src/modules/my-module.cpp:71:3 error: 'what' was not declared in this scope
  2. Use "Strg+Click" / "Ctrl+Click" on the 1st line ( ../../src/modules/my-module.cpp ) \ (klick with left mouse botton while hodling the STRG key on the keyboard) \ → The source is opened in Editor - OK!
  3. Use "Strg+Click" / "Ctrl+Click" on the 2nd line ( ../../src/modules/my-module.cpp:71:3 ) \ → Error message:
    ../../src/modules/my-module.cpp:71:3
    No matching results

Expected behavior: In previous versions the "Strg+Click" / "Ctrl+Click" (klick with left mouse botton while hodling the Strg/Ctrl key on the keyboard) on the 2nd line has opened the source file at the right line and position.

I have done more investigations. I always click with left mouse button while holding the Ctrl key on the keyboard:

link in terminal wnidow result when Ctrl+Click
../../src/modules/my-module.cpp file is opened
../../src/modules/my-module.cpp:71:3 error: No matching results
src/modules/my-module.cpp:71:3 file is opend at the correct position

Configuration and Logs

LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors

Other Extensions

Extension Author (truncated) Version
better-cpp-syntax jef 1.27.1
remote-containers ms- 0.380.0
remote-ssh ms- 0.113.1
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.88.2
vscode-remote-extensionpack ms- 0.25.0
remote-explorer ms- 0.4.3
remote-server ms- 1.5.2
gitlens eam 15.2.3
copilot Git 1.221.0
copilot-chat Git 0.18.1
vscode-language-pack-de MS- 1.92.2024080709
cmake-tools ms- 1.18.44
cpptools ms- 1.21.6
cpptools-extension-pack ms- 1.3.0
makefile-tools ms- 0.9.10
cmake twx 0.0.17
vscode-proto3 zxh 0.5.5

Additional context

No response

browntarik commented 3 months ago

After further investigation, this seems to be an issue with how VS Code is now resolving links in the terminal window. It looks like VS Code is doing a form of partial matching resulting in inconsistent behavior. This issue would be better addressed by them: https://github.com/microsoft/vscode

I will now close this issue as unrelated. Let us know if you have further questions.