Skip to content

pdb's breakpoint should check if condition is a valid expression #103068

Closed

Description

@gaogaotiantian

This could be either a bug report or a feature request. pdb has conditional breakpoint feature where you can set a condition for the breakpoint to be effective. You can also use condition command to change it.

The problem is - it never checks whether that condition is a valid expression. The expression will be evaluated when the breakpoint is hit and if there's a syntax error, it'll just consider it True. This is not an ideal behavior. We can warn the users if their input condition is not even a valid expression because under no circumstances that's the expected input. Also it would not be a valid command.

Linked PRs

Activity

  1. added
    type-featureA feature request or enhancement
    and removed
    type-bugAn unexpected behavior, bug, or error
    on Mar 28, 2023
  2. ambv commented on Mar 28, 2023

    @ambv
    Contributor

    Since this is an equivalent of GH-103023, let's treat this as a new feature, too.

  3. added a commit that references this issue on Mar 29, 2023
  4. ambv commented on Mar 29, 2023

    @ambv
    Contributor

    Landed for 3.12, thanks! ✨ 🍰 ✨

  5. added a commit that references this issue on Apr 11, 2023
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

    type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions