Skip to content

Pytest set_trace() to enable using advanced options [skip option to debug in asyncio] #4416

@txomon

Description

@txomon

This feature is to enable pytest.set_trace() calls to use more advanced and less known features of pdb.

Right now, there is an assumption that pdb.Pdb doesn't take any extra arguments. Although it's not really publicized, or even written much about, when debugging asyncio, you get into the pain that the IOLoop doesn't let you follow your application flow easily.

Every await call will be lost in the depths of the eventloop logic, and it's difficult to find your way back to your program.

This feature would allow you to do something like the following:

import pytest; pytest.set_trace(skip=['asyncio.*', '_weakrefset.*', '_collections_abc.*', 'selectors.*', ])

Where all keyword arguments to set_trace would be passed to Pdb class instantiation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: debuggingrelated to the debugging builtin plugintype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions