Skip to content

Make debug behaviour consistent for all tools #512

Open
@jasperges

Description

When doing #470 I missed some similar calls in the other tools. I would like to make it consistent across all the tools and avoid confusing behaviour.

Things I would like to do:

  • Add the debug variable to the show() function of all the tools.
  • Remove anything that changes the context/session, for example the current asset, project, etc. That can be used when running tests, but should never happen when debugging. It actually makes debugging a lot harder!
  • Include the following (see snippet below) when debug=True. That way hosts who don't rely on Qt themselves don't crash when there is an error in one of the tools. As mentioned here this might actually be quite dangerous. So the other option would be to remove this from all tools. The most important thing is to make it consistent (meaning include this for every tool or for none of them, now some have it and some don't).

if debug:
    import traceback
    sys.excepthook = lambda typ, val, tb: traceback.print_last()

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions