question

AyushGarg-4898 avatar image
0 Votes"
AyushGarg-4898 asked PengGe-MSFT commented

Program not run when clicking "Start Without Debugging" on CMake project using WSL2

I am using Visual Studio 2019 to create a CMake project that runs WSL2 to compile my program. However, when I create the project and then try to start without debugging (Debug > Start Without Debugging), the program builds, and then it isn't run. I have also tried asking the user for input at the end like so:

char a;
std::cin >> a;

Still, no window appears.

c++vs-debugging
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, @AyushGarg-4898
I have not heard from you for a couple of days. Please let me know if there is anything that I can help here.

0 Votes 0 ·

1 Answer

PengGe-MSFT avatar image
0 Votes"
PengGe-MSFT answered

Hi, @AyushGarg-4898

Welcome to Microsoft Q&A!

I cannot reproduce your issue on my side. You can try to repair Visual Studio before debugging.

Sincerely,
Peng


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.