Visual Studio code editor play button not working #150393
Replies: 1 comment
-
Hi @Saqlain532, Thank you for reaching out! I understand that you're having trouble with the "play button" (Run/Debug button) in Visual Studio Code (VS Code) for C/C++ programs, while it works fine for Python. Let’s troubleshoot and resolve this issue step by step.
Make sure: The build/Debug directory exists in your project folder.
GCC Compiler: Install MinGW or another GCC-compatible compiler for Windows. C/C++ Extension: Install the C/C++ extension in VS Code.
Ensure: The program path matches the executable generated by the build task. The preLaunchTask matches the label in your tasks.json file ("build" in this case).
Open the Command Palette (Ctrl+Shift+P). Run Tasks: Run Build Task (or select the build task from the terminal dropdown). Check for any errors in the build process and fix them.
Make sure you have write permissions for the build/Debug directory.
Next Steps If the problem continues, share the updated tasks.json and launch.json files, as well as any error messages from the build process. Let me know how it goes! Best regards, |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Show & Tell
Body
### Hi! I am a beginner of learning code in vs code for c and cpp language play button isn't working . It gives errors after clicking it . Although I can run code manually . I searched alot in chatgpt copilot etc and done the steps but yet the problem not solved . Help me to fix it .I am facing error- {The terminal process "C:\Windows\System32\cmd.exe '/d', '/c', 'gcc -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wcast-align -Wconversion -Wsign-conversion -Wnull-dereference -Wunused-variable -Wdouble-promotion -Wmissing-declarations -fsanitize=address -fsanitize=undefined -fsanitize=leak -ftime-report --std=c17 -g3 -O0 -O2 -fstack-protector -fno-strict-aliasing -IC:\Users\saqlain mu\Downloads\c files/include -I/usr/include -I/usr/local/include -c function_ref.c -o .\build\Debug\function_ref.o && gcc -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 -Wcast-align -Wconversion -Wsign-conversion -Wnull-dereference -Wunused-variable -Wdouble-promotion -Wmissing-declarations -fsanitize=address -fsanitize=undefined -fsanitize=leak -ftime-report --std=c17 -g3 -O0 -O2 -fstack-protector -fno-strict-aliasing -IC:\Users\saqlain mu\Downloads\c files/include -I/usr/include -I/usr/local/include .\build\Debug\function_ref.o -o .\build\Debug\outDebug.exe'" terminated with exit code: 1.
The message displayed-the executable you want to debug does not (yet) exist .you need to build it first
Although I am also working on python and it is working for python
Beta Was this translation helpful? Give feedback.
All reactions