You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is not related to remote-vscode or I checked the following issue
Describe the bug
My launch configuration (.vscode/launch.json) contains a sourceFileMap entry, but this mapping is not used when debugging an individual test case. For example, when attempting to debug, I'll get errors like this:
Unable to open 'calc.c': Unable to read file '/proc/self/cwd/src/calc.c' (Error: Unable to resolve non-existing file '/proc/self/cwd/src/calc.c').
This error is due to bazel paths, and is fixed with the following mapping:
If you skip the advancedExecutables setup step (but still add bazel-bin to testMate.cpp.test.executables), then you should see the same /proc/self/cwd error.
If you then configure advancedExecutables and copy the sourceFileMap setting from launch.json, then the mapping errors go away and debugging works.
If you don't add sourceFileMap into advancedExecutables the navigation doesn't work I assume. So one should add there anyway. Therefore it might not necessary get from launch.json.
Does the navigation (jumb to test) work for you without adding sourceFileMap into advancedExecutables?
Checklist
Describe the bug
My launch configuration (
.vscode/launch.json
) contains asourceFileMap
entry, but this mapping is not used when debugging an individual test case. For example, when attempting to debug, I'll get errors like this:This error is due to bazel paths, and is fixed with the following mapping:
A workaround I found is to add
sourceFileMap
totestMate.cpp.test.advancedExecutables
, although I don't believe that should be necessary. I'm assuming that thesourceFileMap
setting should be picked-up fromlaunch.json
as described here: https://github.com/matepek/vscode-catch2-test-adapter/blob/master/documents/configuration/debug.configTemplate.mdTo Reproduce
An easy way to reproduce this issue is by cloning the following repo and following the steps in the readme:
https://github.com/milesfrain/bazel-googletest
If you skip the
advancedExecutables
setup step (but still addbazel-bin
totestMate.cpp.test.executables
), then you should see the same/proc/self/cwd
error.If you then configure
advancedExecutables
and copy thesourceFileMap
setting fromlaunch.json
, then the mapping errors go away and debugging works.Desktop
Log
snip-log.txt
Environment vars removed.
The text was updated successfully, but these errors were encountered: