formulahendry / vscode-code-runner

Code Runner for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner
MIT License
2.18k stars 291 forks source link

[Feature request] - make cancelling running code intuitive, make turning off read-only intuitive #765

Open icscript opened 3 years ago

icscript commented 3 years ago

I'm a noob and everyone's smarter than me. Now that is out of the way, I use your product with VSCODE, however there's no apparent way to cancel running code. This should be obvious, how about ctrl-C? Further it runs the code read-only so I can't type anything into any prompts in the code, which makes the product useless. Sure, I'm sure there is some way to fix these things, but why require your user to go diving and researching the most basic functionality of your product.

Is your feature request related to a problem? Please describe. I can't effectively use the product because there's no way to cancel code that gets stuck. 100% of my code gets stuck because I can't respond to prompts in the UX of my own code.

Describe the solution you'd like Make it blindingly easy to cancel running code in the output window Make it blindingly easy to run code not in read only mode so one can interact with the running code

swiperthefox commented 3 years ago

Open settings,search for run in terminal and set it to true, then the runner will run your code in the terminal, which allows input.

Without changing the settings, there is also a menu item Run Python file in terminal in the context menu of the editor, which does the same thing as above.

I don't know if the second method is enabled by a python related extension or the code runner, so it might not work for other types of source files.

adam248 commented 1 year ago

I am not sure if this issue is resolved or not by the following...

When running code with the Run Code (Ctrl-Alt-N) command or the button image you will get a stop button next to the Run Code button called Stop Code Run (Ctrl-Alt-M) image

This allows you to stop your code and it will exit with code=1 image

Thank you