Skip to content

Only support restart command in pdb when it's a command line usage #123756

Description

@gaogaotiantian

Feature or enhancement

Proposal:

Now when we have a breakpoint() in the source code and enter pdb, we can do restart and raise a Restart exception - which in most cases will just stop the program with an exception. For other rare cases, it might be even worse.

It simply does not make sense to allow a restart command if pdb is not brought up from command line - that exception is only caught in command line usage. So, we should only allow restart in command line usage and do nothing (except for an error) in other cases.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions