Skip to content

sys.gettrace() is not being used anymore  #8

@ar-qun

Description

@ar-qun

Hi there,

While going through the course, I have noticed that the debugging mode in Pycharm doesn't activate the debugging mode in Flask anymore. However, if I replace the code below

being_debugged = sys.gettrace() is not None

with

    being_debugged = sys.monitoring.get_tool(sys.monitoring.DEBUGGER_ID) is not None

It now works again.

If maintainers approve of this change I will prepare a PR :) I can also keep it backward compatible.

What do you think?

Metadata

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