- Notifications
You must be signed in to change notification settings - Fork516
Enable Quick Debugging in Test Explorer like in Project Outline#3451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
basejumpa commentedNov 16, 2023
@microsoft-github-policy-service agree |
basejumpa commentedNov 17, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
As you guys are the creators of the issues addressed by this PR I'd appreciate if you could do some beta testing. You may use the vsix package fromhttps://github.com/basejumpa/vscode-cmake-tools/actions/runs/6895050421 and install it via ˋcode --install-extension cmake-tools.vsixˋ (remove the installed one before). |
quyykk commentedNov 18, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I tried the original version before the force push and it didn't seem to work, saying |
basejumpa commentedNov 19, 2023
@quyykk I needed to uninstall the extension before installing the vsix package. It sounds like you didn't uninstall, either. |
quyykk commentedNov 19, 2023
I did uninstall it before trying. I can try again though. However, with the latest version I get prompted to select a launch configuration instead of seeing an error, so I'm pretty sure this is caused by this PR. |
basejumpa commentedNov 20, 2023
I assume you used the "Debug C/C++m File" button in the headline of a cpp (test) file as shown in the screenshot as (1). This never was connected to vscode-cmake-tools (afaik). You should use the "Debug Test" button in the test explorer marked by (2). The related documentation in |
quyykk commentedNov 20, 2023
basejumpa commentedNov 20, 2023
@quyykk Weird! And you really installed via the command line the cmake-tools.vsix built from my feature branch athttps://github.com/basejumpa/vscode-cmake-tools/actions/workflows/build-vsix.yml ? |
quyykk commentedNov 20, 2023
Yeah, I used the link you posted above. I also restarted VSCode and verified that it is uninstalled before installing the file. I've also disabled Auto-Update, because it would update the extension immediately. |
basejumpa commentedNov 22, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Thx for your screencast. Since I am working on Win11 and I saw you working on linux I tried it out in a github workspace (Ubuntu). Since it worked there as intended (seemy screencast I assume that at your machine it didn't work to replace the extension by the vsix file. Here are the steps I did in the screencast where I used my "try-out-zone" repository with very simple cmake projects:
Result:
|
quyykk commentedNov 22, 2023
@basejumpa Thanks, I tried your test project on my machine and it did indeed work! So I have to assume it has something to do with the project I used. I thought it was because of presets, but I added a default preset to your project and it still worked, so I'll have to investigate some more I guess 😄 |
basejumpa commentedNov 22, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@quyykk I now managed to use the project on branch you're currently working on (see pull-requestendless-sky/endless-sky#8095 ) with my changed extension inside a github codespace. And you won't believe it: I have the same behavior as you had: So now I can reproduce the behavior and work on it. I'll ping you here as soon as I have some update worth to test it. Thx in advance! By the way: ExtensionC++ TestMate works like a charm with your code (since your unit tests are made withCatch2). Steps to complete build enviornment in a GitHub codespacecode --install-extension ms-vscode.cpptools-extension-pack# Do what the .github/workflows/ci.yml doessudo rm /etc/apt/sources.list.d/*&& sudo dpkg --clear-avail# Speed up installation and get rid of unwanted listssudo apt-get updatesudo apt-get install -y --no-install-recommends libxmu-dev libxi-dev libgl-dev libglu1-mesa-dev libgles2-mesa-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev libosmesa6 mesa-utils libglvnd-dev x11-utilssudo sh -c'echo "pcm.!default { type plug slave.pcm \"null\" }" >> /etc/asound.conf'cmake --versionapt-get upgrade cmakesudo apt-get upgrade cmakecmake --version# Get younger cmake with supports Ninja Multi-Config# @see https://askubuntu.com/questions/355565/how-do-i-install-the-latest-version-of-cmake-from-the-command-line# @see https://apt.kitware.com/sudo apt remove --purge --auto-remove cmakecmake --versionsudo apt-get upgradesudo apt-get updatesudo apt-get cmakesudo apt-get install cmakecmake --versionsudo apt update&& sudo apt install -y software-properties-common lsb-release&& sudo apt clean allwget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc2>/dev/null| gpg --dearmor -| sudo tee /etc/apt/trusted.gpg.d/kitware.gpg>/dev/nullsudo apt-add-repository"deb https://apt.kitware.com/ubuntu/$(lsb_release -cs) main"sudo apt updatesudo apt install kitware-archive-keyringsudo apt updatesudo apt install cmakecmake --version# Install ninjasudo apt-get install ninja-b# Instgall SDL2cd ..mkdir tmpcd tmpgit clone https://github.com/libsdl-org/SDL.git -b SDL2cd SDLmkdir buildcd build../configuremakesudo make installsudo apt-get install libsdl2-2.0-0sudo apt-get install libjpeg-devsudo apt-get install libjpegsudo apt-get install libglewsudo apt-get install libglew-devsudo apt-get install libopenalsudo apt-get install libopenal-devsudo apt-get install libmad0-dev# Download and force install of the build of CMake tools of the build https://github.com/basejumpa/vscode-cmake-tools/actions/runs/6912931021gh run download 6912931021 --repo basejumpa/vscode-cmake-tools --name=cmake-tools.vsixcode --install-extension cmake-tools.vsix --force# Reload VScodecode --reuse-window. |
basejumpa commentedNov 25, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The "culprit" why my changes weren't effective in the endless-sky project is the renaming via athere. When I comment out that statement it works as expected. Steps to establish work-environment with endless-sky as testdataCreate codespace on#3451 Whenever notification dialogs appear in the lower right: Close them with the cross in their title bar. In view "TERMINAL" do ... In Sidebar hit Run & Debug Launch Extension In the new instance of VSCode do the following: Open folder CTRL-SHIFT-P cmake select configure preset Select the first one on top CTRL-SHIFT-P cmake select build preset Select Debug In Status Bar hit "Build" |
basejumpa commentedNov 25, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@quyykk Now it works in your project as well. I would appreciate if you could try out the vsix from buildhttps://github.com/basejumpa/vscode-cmake-tools/actions/runs/6991343632 |
quyykk commentedNov 28, 2023
@basejumpa Works on my end too, thanks! |
weyllor commentedApr 20, 2024
+1 |
gcampbell-msft commentedJul 11, 2024
@basejumpa It seems like you've gotten some feedback that this helps out some scenarios for users, is this something you'd like to merge into the extension? If so, please convert from a draft to an official PR |
basejumpa commentedJul 12, 2024
@gcampbell-msft Thx for the reminder. I'll resume working in it: Rebase my changes, double-check if things need to be adapted, add some tests, ... As soon as it is sufficient I remove the draft flag. |
gcampbell-msft commentedOct 7, 2024
@basejumpa Pinging on this. It's been a while since there was any activity on this, is this still something you'd like to merge into the product? My main feedback in general, is that it seems like we don't necessarily need to remove the features from#3064, but we could instead use your implementation when no launch configurations are found. This way, you can have the best of both worlds. Please let us know if this is still something you plan to work on. |
basejumpa commentedOct 26, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This topic hasn't bothered me the recent months only because currently I am busy with other topics. Shall mean please feel free to tackle this topic, maybe my old work towards some solution may help. |


Uh oh!
There was an error while loading.Please reload this page.
This change addresses items#3345,#3280 and#3153
The following changes are proposed:
When the user debugs a test via
TestExplorer/some-test/Debug-Iconnow the method to create a debug configuration behind the scenes is used as when the user right-clicks an executable and used "Debug" in thePROJECT OUTLINEof cmake.The purpose of this change
Harmonize Quick Debugging of executables and tests.
Simplify debugging of tests.
Changes in current behavior
This removes behavior introduced by PR#3064. But I think this is fine, see#3345 (comment) .
This may necessary to adapt the documentation athttps://github.com/microsoft/vscode-cmake-tools/blob/main/docs/debug-launch.md#debugging-tests I'd add a suggestion if you guys like.
Please have a look there as well. Thx.
Remark: I usedhttps://github.com/basejumpa/vscode-cmake-tools-testdata as testdata while coding.