Skip to content

Instantly share code, notes, and snippets.

@dym-ok
Created November 1, 2023 14:59
Show Gist options
  • Save dym-ok/4b1d0ccc551924d8a01bf45688850b69 to your computer and use it in GitHub Desktop.
Save dym-ok/4b1d0ccc551924d8a01bf45688850b69 to your computer and use it in GitHub Desktop.
debugging faulty Python code

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment