microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.97k stars 29.19k forks source link

On Tester view, C++, when double clicking a test it navigates to a CMake file #201270

Closed yoavmil closed 10 months ago

yoavmil commented 10 months ago

Type: Bug

On Tester view, using GTest C++, when double clicking a test it navigates to a CMake file "C:\Program Files\CMake\share\cmake-3.25\Modules\GoogleTest.cmake". Instead, it shoud navigate to the code of the test. This also happens when clicking the "Go-To-Test" button. This forces me to navigate to the test manually which could take time.

Maybe it's relevant, to build the tests I use CMake gtest_add_tests(TARGET target_name).

(Related, when clicking the test Debug button doesn't actually run this specific test in debug mode)

VS Code version: Code 1.83.1 (f1b07bd25dfad64b0167beb15359ae573aecd2cc, 2023-10-10T23:48:05.904Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 x 3600)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.92GB (4.25GB free)| |Process Argv|--folder-uri file:///c%3A/Users/User/source/repos/MagnusViewer --crash-reporter-id 9d19a473-c68b-42a9-b9c5-cf4377236ced| |Screen Reader|no| |VM|0%|
Extensions (31) Extension|Author (truncated)|Version ---|---|--- angular-material|1to|0.13.0 cpp-helper|ami|0.3.3 ng-template|Ang|17.0.3 htmltagwrap|bra|1.0.0 cmake-format|che|0.6.11 vscode-eslint|dba|2.4.2 githistory|don|0.6.20 EditorConfig|Edi|0.16.4 prettier-vscode|esb|10.1.0 copilot|Git|1.143.0 copilot-chat|Git|0.8.0 better-cpp-syntax|jef|1.17.2 angular-essentials|joh|16.0.4 Angular2|joh|16.0.1 vscode-peacock|joh|4.2.2 cmake-language-support-vscode|jos|0.0.9 nc-gcode|ML|0.13.0 vscode-dotnet-runtime|ms-|2.0.0 isort|ms-|2023.10.1 python|ms-|2023.22.1 vscode-pylance|ms-|2023.12.1 cmake-tools|ms-|1.17.7 cpptools|ms-|1.18.5 cpptools-extension-pack|ms-|1.3.0 powershell|ms-|2023.8.0 debugger-for-edge|msj|1.0.15 material-icon-theme|PKi|4.32.0 color-manager|roy|0.7.5 code-spell-checker|str|3.0.1 cmake|twx|0.0.17 vscode-proto3|zxh|0.5.5 (2 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 py29gd2263:30899288 vsclangdc:30486549 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 282f8724:30602487 f6dab269:30613381 a9j8j154:30646983 showlangstatbar:30737416 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 welcomedialog:30910333 pythonnosmt12:30797651 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 dsvsc013:30795093 dsvsc014:30804076 dsvsc015:30845448 pythontestfixt:30902429 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 aa_t_chat:30882232 cp7184c:30925681 ```
vscodenpa commented 10 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.85.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

yoavmil commented 10 months ago

also happens in 1.85.1

Version: 1.85.1 (system setup) Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 Date: 2023-12-13T09:49:37.021Z Electron: 25.9.7 ElectronBuildId: 25551756 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045

vscodenpa commented 10 months ago

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.

Happy Coding!

yoavmil commented 10 months ago

Help: Start extension bisect is a cool tool! thanks!