tractor icon indicating copy to clipboard operation
tractor copied to clipboard

REPL-driven, multi-process-native debugger features

Open goodboy opened this issue 5 years ago • 1 comments

In tractor every actor is both a (potential) client and server. Concocting a "native" feeling "remote debugger" shouldn't be that bad (they thought naively..), right?

I did a little digging and asked all the cool peeps what they use. Well here's a list of interesting stuff:

popular Python remote debuggers

What I want:

  • write breakpoint() in actor code and tractor does the right thing and yields std stream control in FIFO order to whatever actor got their message to the parent first
  • first class support for pdbpp, it's just too good not to use
  • the ability to switch between multiple actors who have breakpoints in a sensible way much like gdb does with threads

Profiling and other possible tools and approaches

A WIP list of tooling/instrumentation that might add to and/or inspire ideas for the future!

  • https://mikelevins.github.io/posts/2020-12-18-repl-driven/
    • https://mikelevins.github.io/tags/programming/page/2/
    • https://www.youtube.com/watch?v=NqKyHEJe9_w
  • https://trio.readthedocs.io/en/stable/reference-lowlevel.html?highlight=instrument#debugging-and-instrumentation
  • https://tokio.rs/blog/2021-12-announcing-tokio-console
  • hot code reloading from erlang and friends:
    • https://www.erlang.org/doc/reference_manual/code_loading.html#code-replacement
    • https://blog.appsignal.com/2021/07/27/a-guide-to-hot-code-reloading-in-elixir.html
    • https://blog.appsignal.com/2018/10/16/elixir-alchemy-hot-code-reloading-in-elixir.html

REPL driven, would love to have, features

As always, lurkers feel free to pipe in with ideas :surfing_man:

goodboy avatar Feb 11 '20 01:02 goodboy

Been doing lots of digging as part of #129 and dumping some links:

  • ptk has utils for not clobbering stdout which would be super handy for having multiple actors logging while your in the middle of debugging a crash.

More to come..

goodboy avatar Jul 24 '20 16:07 goodboy