mdmintz / pdbp

pdbp (Pdb+): A drop-in replacement for pdb and pdbpp. To replace "pdb", add "import pdbp" to an "__init__.py" file.
Other
75 stars 2 forks source link

! statement doesn't support #53

Closed mengban closed 1 year ago

mengban commented 1 year ago

Excellent work! But there is something is not as expected about ! statement described here https://docs.python.org/3/library/pdb.html when I want to assign values ​​to variables in debugging, it does't work.
however, the pdb is ok. Here is my env:

Linux   
Python==3.10.6
pdbp== 1.4.6 
mdmintz commented 1 year ago

From the https://docs.python.org/3/library/pdb.html documentation:

! statement

Execute the (one-line) statement in the context of the current stack frame.
The exclamation point can be omitted unless the first word of the statement resembles a debugger command.

With that, I took a debugger command, frame, and used the ! statement to turn it into a variable:

Screenshot 2023-08-21 at 5 31 03 AM

I was able to use the ! statement to turn a debugger command into a variable. What issue are you seeing?

The ! statement should only be needed if using a debugger command as a variable.