Stop Sublime Text from executing infinite loop

前端 未结 7 1749
不知归路
不知归路 2020-12-28 15:36

When I do something like

while True:
    print(\'loop\')

and execute that code in sublime I am not able to stop it. I have to manually kill

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-28 15:49

    The combination is ctrl+break.

    In Windows there is no break button, so you can go to Preferences > Key Bindings and to the user side add this:

    { "keys" : ["ctrl+c"], "command": "cancel_build"}

    Now, by pressing Ctrl+C the execution will stop. Of course, you can change the combination to whatever you want.

提交回复
热议问题