top | item 46594570

(no title)

willquack | 1 month ago

> `seapie.breakpoint()` opens a working `>>>` REPL at the current execution state. Any changes to variables or function definitions persist. Debugger state is exposed via built-ins (e.g. `_magic_`), and stepping/frame control/etc is handled via small `!commands`.

This is largely what `pdb` does already, no? Example:

```

(Pdb) list

  1   something = 100

  2   import pdb; pdb.set_trace()

  3  -> print(f"value is: {something}")
(Pdb) something = 1234

(Pdb) c

value is: 1234

```

I do like that you use `!<cmd>` to avoid the naming collision issue in pdb between commands and python code!!!

discuss

order

skylurk|1 month ago

Pdb also has !<cmd>

For example, !interact will give you a working >>> REPL

BiteCode_dev|1 month ago

And ipdb if you want ipython repl.