You can press ctrl-c which sends SIGINT signal that immediately interrupts your program and stops it ( Unless you have a custom handler for this signal ;) )
Hello! Just started learning python and got introduced to what infinite loops are! I typed up some stuff to make an infinite loop and tried to do ctrl+C to kill it in the vs code terminal but it wouldn't work. I tried cmd+C too (I have a Mac) and that code kept going... Would love help and direction in what I'm doing wrong + how to stop an infinite loop!
Edit: Thank you all for your helpful tips! :)
As the title says, I'm an absolute noob at VSC, I'm using it for Python. Previously, I used to use Notepad++, but it's been bugging me.
Basically , I have a bad habit of creating infinite loops and generally I've been able to set up keyboard shortcuts to terminate the code. Having trouble finding an answer. I've seen places say to use Ctrl + C and Ctrl + Alt + M, but neither work.
Edit: I have a Windows, not Mac.
I apparently created an infinite python while loop but had to quit the app to cancel. Is there a way to just cancel the operation?
Deleting the terminal didn't help, nor closing/reopening the file. Just when I go to run the fie it always says 'already running'. Some articles said Ctrl C .. I tried it nothing happened but maybe I'm typing it in the wrong path... Do I cd into the directory the file.py is in?