GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Inline breakpoints should use the most recent pdb isntance, instead of creating a new one · Issue #121450 · python/cpython

Inline breakpoints should use the most recent pdb isntance, instead of creating a new one #121450

New issue
Copy link
New issue
Copy link
Closed
Closed
Inline breakpoints should use the most recent pdb isntance, instead of creating a new one#121450
Copy link
Labels
type-featureA feature request or enhancementA feature request or enhancement

Description

@gaogaotiantian
gaogaotiantian
opened on Jul 6, 2024
Issue body actions

Feature or enhancement

Proposal:

Currently, the inline breakpoints (breakpoint() or pdb.set_trace()) will create a new pdb instance, which breaks all the instance-specific feature for pdb. For example, all the displays will be discarded. The last_cmd will be lost so <Enter> will not repeat the last command you type. Breakpoints will be preserved but the corresponding commands won't exist anymore. Everything stored in the pdb instance will not work anymore.

We should make inline breakpoints work as the real breakpoints set in the debugger - just break there and keep everything. My approach is to store the last pdb instance created and use that in pdb.set_trace(). This solves all the issues above and I think it's the right way to go.

It will also make features the rely on data on instance possible with inline breakpoints.

Very few existing code will be impacted.

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

  • gh-121450: Make inline breakpoints use the most recent pdb instance #121451

Activity

  1. gaogaotiantian
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Jul 6, 2024
  2. gaogaotiantian
    added a commit that references this issue on Jul 11, 2024

    gh-121450: Make inline breakpoints use the most recent pdb instance (#…

    690b935
  3. gaogaotiantian
    closed this as completedon Jul 11, 2024
  4. estyxx
    added a commit that references this issue on Jul 17, 2024

    pythongh-121450: Make inline breakpoints use the most recent pdb inst…

    594bc77
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 enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.