You can either launch interpreter in debug mode like this: python3 -q -X faulthandler or use in code import faulthandler faulthandler.enable() // bad code goes here to catch sources of IllegalInstruction and other similar errors.