Open ic2000 opened 4 months ago
@ic2000, thanks for reporting this issue. Today we try to repro your issue using a simple project, and after building the project, launch the target in the terminal instance(MSYS2). we find that the target could launch successfully. Please see the below picture. For further investigation, could you please share us a demo project with clear repro steps? We are looking forward to hearing from you. Thanks. ENV: VS code: 1.91.1 CMake Tool: v1.18.43
what if you use the automation profile setting instead? semi-related: #3756
@starball5, thanks for your reply. Today we try to repro your issue with automation profile setting, and after building the project, launch the target in the terminal instance(Powershell). we find that the target could launch successfully. Please see the below picture. Thanks. ENV: VS code: 1.91.1 CMake Tool: v1.18.43
Brief Issue Summary
In my case, I'm using MSYS2 for my default terminal:
I rely on these arguments in order to pick the correct MSYS shell and to bring over the path variables (especially important for running my program after compiling, as without "inherit" being defined the path starts from a flash slate).
It seems like CMake Tools only retrieves and utilises the shell path, ignoring the rest of the user's configuration for that shell. I haven't found any means to configure this and it essentially renders the Launch Target feature useless for anyone who has a non-trivial shell setup.
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
The terminal instance created by Launch Target:
The terminal instance created by VS Code, properly utilising my terminal configuration:
https://github.com/microsoft/vscode-cmake-tools/commit/d9557e68f4b08983414ef45ea08caa8523c68f28 is how I've personally got around this for the meantime.