microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.43k stars 429 forks source link

Please configure CMake to build and run the tests I'm running #3838

Open ArnoGW1 opened 1 week ago

ArnoGW1 commented 1 week ago

Brief Issue Summary

Using a launch.json file, if I have selected target A for build and debug in the CMake tools UI then run test target B, VSCode builds and runs target A with B's arguments.

This makes frequently switching between a library's tests and an executable very tedious, I have to click 7 times (click CMake, click the build icon, type and select B, click the debug icon, type and select B, click on test tab, click on debug test). And it's a mouse workflow which is worse than keyboard.

It doesn't seem to cause any problems to auto-configure CMake to build and run the test target corresponding to the tests the user asked to run?

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

v-frankwang commented 1 week ago

@ArnoGW1 Thank you for reporting this issue. Regarding this issue, we tried to reproduce it using a simple demo project but were not able to reproduce it, in order to investigate further, could you please provide us with a simple project that can reproduce this issue, we look forward to your feedback.