I'm running a python flask server locally by clicking the run button in VS Code (provided by the Code Runner extension).
How do I stop the server without closing and restarting VS Code?
I'm running a python flask server locally by clicking the run button in VS Code (provided by the Code Runner extension).
How do I stop the server without closing and restarting VS Code?
From the Code Runner extension marketplace page, you have the following options:
To stop the running code:
- use shortcut Ctrl + Alt + M
- or press F1 and then select/type Stop Code Run
- or right click the Output Channel and then click Stop Code Run in context menu
YMMV with the Ctrl + Alt + M shortcut, which does not work for me for some reason.
Mihai Chelaru has already answered the question, but I just wanted to let everyone know that by changing from Ctrl + Alt + M to e.g. Ctrl + Alt + B, the code run does stop.
ctrl
+ alt
+ B
for coderunner stop code and it still isn't working. –
Precipitous For accepting input, you should enable the setting shown below, otherwise it will show code is running.
Open VS Code Settings UI and type 'code runner'. Scroll down a little bit, find this 'code-runner: run in terminal' and enable it. Then restart VsCode.
You can use these methods to solve your problem:
Press Ctr+Alt+M
to clear your previous output and then run the code again.
You can go to the bottom left of your VS Code page and click on Settings (a gear icon) and select Settings. Then type "code runner" and select the first option "Clear the previous output." That's it.
If ctrl+alt+m is not working for you, click on the red square symbol beside the symbol for running the code at the upper-right side of the screen, then save and run again.
Use Ctrl+Alt+M
or F1 and then select/type Stop Code Run
Other useful Code Runner Commands you can use can be found here: CodeRunner
see if ctrl+alt+M is not working for me, and if you are using coderunner in your computer then see at the top right side there red color square icon symbolizing coderunner just click on that the code will stop running
© 2022 - 2024 — McMap. All rights reserved.