logoalt Hacker News

willquacklast Monday at 9:31 PM2 repliesview on HN

> `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!!!


Replies

skylurkyesterday at 4:36 AM

Pdb also has !<cmd>

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

BiteCode_devtoday at 12:22 PM

And ipdb if you want ipython repl.