Control-C execution interruption

Every time I run or debug in PyCharm, the execution cannot be interrupted with Ctrl-C, as it would in MacOS Terminal

I would like to trap the Ctrl-C to take closing actions inside PyCharm, to make sure the process would run smooth in the terminal.

KeyboardInterrupt is probably the Exception I need to look out for, but inside the IDE it is never thrown.

Any help is appreciated.

Thanks

Please sign in to leave a comment.