Search code examples
pythonpycharmbuilt-in

Prevent PyCharm from showing builtin modules on KeyboardInterrupt and other occasions


In PyCharm when an Error occurs the IDE opens the module that produced the Error (this is especially annoying when the Error was produced by pressing Ctrl+C).

It also opens the module in which the program currently "is" when pausing in Debug mode. Is there a way to disable this behavior for built-in modules? (Preferably with a way of showing the exception anyway in case you want to see the source of the built-in module)


Solution

  • I accept the bounty as it pointed to the right direction:

    applying the same trick to the file pydevd.py line 1793 finally solved it for me!!

            try:
              launch(file, globals, locals)  # execute the script
            except:
              import traceback; traceback.print_exc()