inducer / inducer/pudb

Add the ability to set a watch expression on an object by ID

Open
#511 8 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
3.2k
Forks
245
Avg merge
13m
Merged PRs (30d)
5

Description

**Is your feature request related to a problem? Please describe.**

I would love to be able to trace the evolution of a value across stack frames. This means that variables don't exist, but often the *object* that I care about is being mutated.

**Describe the solution you'd like**

The nicest thing, I think, would be for the watch expression dialog to get an enhanced view (maybe a select box that changes it to be this view)

| Object Reference | Watch expression |
|-------------------|-------------------|
| `myobj________` | `myobj.value___` |

In an ideal world, pudb would look up the `id(myobj)` and then every time it entered a frame it would scan the variables to see if any of them have the same ID as myobj. If they do, then:

* if the object exists and has the same name you get the current display `myobj.value: ...`
* if the variable has a different name you get: `(myobj -> newname).value: ...`
* if the object does not exist: `myobj: `

**Describe alternatives you've considered**

Currently I just constantly re-enter watch expressions in every frame, whether or not the variable name has changed.

Having the option to have watch expressions persist across frames would be helpful, usually there is a set of at most 4 var names that I care about and I wouldn't mind having 3 of the 4 be an error at any given time if it meant I didn't need to re-enter expressions all the time.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.