microsoft / microsoft/vscode-cmake-tools

The test process will remain loaded after clicking “Debug Tests”

Open
#3,757 3 comments 0 reactions 0 assignees View on GitHub
bug Feature: ctest
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

Repro steps:

1. Create a new folder named 'CMakeProject1' and open it with vscode.
2. Create a file named CMakeLists.txt with the following content:
```
cmake_minimum_required(VERSION 3.8)
project(CMakeProject1)
add_executable(CMakeProject1 "CMakeProject1.cpp" "CMakeProject1.h")
enable_testing()
add_executable(UnitTest "test.cpp")
add_test(UnitTest0 UnitTest 0)
add_test(UnitTest1 UnitTest 1)
```
3. Create a file named test.cpp with the following content:
```
#include "iostream"
auto main() -> int { std::cout << "hello world" << std::endl; }
```
4. Create a file named CMakeProject1.cpp with the following content:
```
#include "CMakeProject1.h"
using namespace std;
int main()
{
cout << "Hello CMake." << endl;
return 0;
}
```
5. Create a file named “CMakeProject1.h” with the following content:
```
#pragma once
#include "iostream"
```
6. Run command: “CMake:configure”
7. Run command: "C/C++:Add Debug Configuration"
8. Select :"(lldb) launch“
9. Click on Testing in the left navigation bar
10. Click'Debug Tests'.

Actual results:
After clicking Debug tests it will keep running and no results will appear, after clicking Cancel Test Run an error popup will appear in the bottom right corner.

https://github.com/microsoft/vscode-cmake-tools/assets/160998958/271226e9-49ac-457b-a891-54e6925f07cd

### CMake Tools Diagnostics

_No response_

### Debug Log

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue using the listed CMake project, CMake:configure, C/C++:Add Debug Configuration, and the Testing view's Debug Tests command. Trace the CMake Tools test and debug integration to determine why the test process remains running; done means Debug Tests reports results and cancelling does not produce an error popup.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, vscode
Domain
devtools, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.