vscode-cmake-tools
vscode-cmake-tools copied to clipboard
[Windows][Ninja] "configurePresets.environment" does not apply to Launch or Debug
Type: Bug
- Use a CMakePresets.json
- Set the environment PATH to anything noticeable. Such as below:
"configurePresets": [
{
...
"environment": {
"PATH": "blah"
}
...
}
- Compile and launch the target.
- In the terminal, run
echo $env:PATH - You should see "blah"
I noticed that after launch, my exe would crash because some of the required libs searched in PATH couldn't be found.
It seems that this is due to the terminal/debugger environment not being set correctly by the CMake Tools extension.
It is worth noting that setting PATH in settings.json with "cmake.environment" does work.
The correct behavior is documented here.
Extension version: 1.17.17 VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:20:17.278Z) OS version: Windows_NT x64 10.0.22631 Modes:
System Info
| Item | Value |
|---|---|
| CPUs | AMD Ryzen 7 5700X 8-Core Processor (16 x 3400) |
| 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 skia_graphite: disabled_off video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | undefined |
| Memory (System) | 39.93GB (25.73GB free) |
| Process Argv | --folder-uri file:///e%3A/Development/InfinityCreator --crash-reporter-id c5842e4f-069d-4532-a1d1-c9f7725bd7cf |
| Screen Reader | no |
| VM | 50% |
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
g1icg217:30999571
@nolankramer I'm curious about this repro, and if you can provide an exact repro. I was able to test your scenario and it worked as expected.
What version of the extension are you using?
Hey @gcampbell-msft, Version is 1.17.17
My project is very large and proprietary - however the repro steps above should be sufficient to repro on that version!
@nolankramer Could you attempt on the pre-release version? I think we may have this issue fixed there.