When I run my code in Visual Studio Code using the run button, it is stuck on the Python Debugger: debug using launch.json.
However, I just want it to run my code through the coderunner.
this picture shows my problem. Notice the run has a bug on it and I just want it to run regularly
I do not know what causes this problem and I do not know how to fix it.
2
Answers
Click the drop-down arrow next to the button, and choose "Run Python File":
You can specify a "default build task" in VS Code to run Python code (without debugging) by pressing
Ctrl
+Shift
+B
on the keyboard.To add the task, go to (in the main menue of VS Code)
->
Terminal
->
Configure Default Build Task
->
Create tasks.json file from template
->
Others
,and replace the existing code in tasks.json by the code below.
With a Python file opended in a tab in VS Code, you can run the respective file by pressing
Ctrl
+Shift
+B
on the keyboard. Feedback like print statements etc will appear in the terminal.The code below is a slightly modified version of this answer.