Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL-driven, multi-process-native debugger features #113

Open
goodboy opened this issue Feb 11, 2020 · 1 comment
Open

REPL-driven, multi-process-native debugger features #113

goodboy opened this issue Feb 11, 2020 · 1 comment
Labels
debugger discussion enhancement New feature or request help wanted Extra attention is needed

Comments

@goodboy
Copy link
Owner

goodboy commented Feb 11, 2020

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!


REPL driven, would love to have, features

As always, lurkers feel free to pipe in with ideas 🏄‍♂️

@goodboy
Copy link
Owner Author

goodboy commented Jul 24, 2020

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 goodboy added this to the 0.0.0a0.dev0 milestone Jul 25, 2020
goodboy added a commit that referenced this issue Jul 30, 2020
This is the first step in addressing #113 and the initial support
of #130. Basically this allows (sub)processes to engage the `pdbpp`
debug machinery which read/writes the root actor's tty but only in
a FIFO semaphored way such that no two processes are using it
simultaneously. That means you can have multiple actors enter a trace or
crash and run the debugger in a sensible way without clobbering each
other's access to stdio. It required adding some "tear down hooks" to
a custom `pdbpp.Pdb` type such that we release a child's lock on the
parent on debugger exit (in this case when either of the "continue" or
"quit" commands are issued to the debugger console).

There's some code left commented in anticipation of full support for
issue #130 where we're need to actually capture and feed stdin to the
target (remote) actor which won't necessarily being running on the same
host.
goodboy added a commit that referenced this issue Jul 30, 2020
This is the first step in addressing #113 and the initial support
of #130. Basically this allows (sub)processes to engage the `pdbpp`
debug machinery which read/writes the root actor's tty but only in
a FIFO semaphored way such that no two processes are using it
simultaneously. That means you can have multiple actors enter a trace or
crash and run the debugger in a sensible way without clobbering each
other's access to stdio. It required adding some "tear down hooks" to
a custom `pdbpp.Pdb` type such that we release a child's lock on the
parent on debugger exit (in this case when either of the "continue" or
"quit" commands are issued to the debugger console).

There's some code left commented in anticipation of full support for
issue #130 where we're need to actually capture and feed stdin to the
target (remote) actor which won't necessarily being running on the same
host.
goodboy added a commit that referenced this issue Aug 4, 2020
This is the first step in addressing #113 and the initial support
of #130. Basically this allows (sub)processes to engage the `pdbpp`
debug machinery which read/writes the root actor's tty but only in
a FIFO semaphored way such that no two processes are using it
simultaneously. That means you can have multiple actors enter a trace or
crash and run the debugger in a sensible way without clobbering each
other's access to stdio. It required adding some "tear down hooks" to
a custom `pdbpp.Pdb` type such that we release a child's lock on the
parent on debugger exit (in this case when either of the "continue" or
"quit" commands are issued to the debugger console).

There's some code left commented in anticipation of full support for
issue #130 where we're need to actually capture and feed stdin to the
target (remote) actor which won't necessarily being running on the same
host.
goodboy added a commit that referenced this issue Aug 4, 2020
This is the first step in addressing #113 and the initial support
of #130. Basically this allows (sub)processes to engage the `pdbpp`
debug machinery which read/writes the root actor's tty but only in
a FIFO semaphored way such that no two processes are using it
simultaneously. That means you can have multiple actors enter a trace or
crash and run the debugger in a sensible way without clobbering each
other's access to stdio. It required adding some "tear down hooks" to
a custom `pdbpp.Pdb` type such that we release a child's lock on the
parent on debugger exit (in this case when either of the "continue" or
"quit" commands are issued to the debugger console).

There's some code left commented in anticipation of full support for
issue #130 where we're need to actually capture and feed stdin to the
target (remote) actor which won't necessarily being running on the same
host.
goodboy added a commit that referenced this issue Aug 9, 2020
This is the first step in addressing #113 and the initial support
of #130. Basically this allows (sub)processes to engage the `pdbpp`
debug machinery which read/writes the root actor's tty but only in
a FIFO semaphored way such that no two processes are using it
simultaneously. That means you can have multiple actors enter a trace or
crash and run the debugger in a sensible way without clobbering each
other's access to stdio. It required adding some "tear down hooks" to
a custom `pdbpp.Pdb` type such that we release a child's lock on the
parent on debugger exit (in this case when either of the "continue" or
"quit" commands are issued to the debugger console).

There's some code left commented in anticipation of full support for
issue #130 where we're need to actually capture and feed stdin to the
target (remote) actor which won't necessarily being running on the same
host.
goodboy added a commit that referenced this issue Aug 13, 2020
This is the first step in addressing #113 and the initial support
of #130. Basically this allows (sub)processes to engage the `pdbpp`
debug machinery which read/writes the root actor's tty but only in
a FIFO semaphored way such that no two processes are using it
simultaneously. That means you can have multiple actors enter a trace or
crash and run the debugger in a sensible way without clobbering each
other's access to stdio. It required adding some "tear down hooks" to
a custom `pdbpp.Pdb` type such that we release a child's lock on the
parent on debugger exit (in this case when either of the "continue" or
"quit" commands are issued to the debugger console).

There's some code left commented in anticipation of full support for
issue #130 where we're need to actually capture and feed stdin to the
target (remote) actor which won't necessarily being running on the same
host.
goodboy added a commit that referenced this issue Sep 24, 2020
This is the first step in addressing #113 and the initial support
of #130. Basically this allows (sub)processes to engage the `pdbpp`
debug machinery which read/writes the root actor's tty but only in
a FIFO semaphored way such that no two processes are using it
simultaneously. That means you can have multiple actors enter a trace or
crash and run the debugger in a sensible way without clobbering each
other's access to stdio. It required adding some "tear down hooks" to
a custom `pdbpp.Pdb` type such that we release a child's lock on the
parent on debugger exit (in this case when either of the "continue" or
"quit" commands are issued to the debugger console).

There's some code left commented in anticipation of full support for
issue #130 where we're need to actually capture and feed stdin to the
target (remote) actor which won't necessarily being running on the same
host.
@goodboy goodboy changed the title Proper multiprocessing-native debugger wen? Multi-process-native debugger features Feb 24, 2021
@goodboy goodboy removed this from the 0.0.0a0.dev0 milestone Feb 24, 2021
@goodboy goodboy added debugging and removed question Further information is requested labels Dec 21, 2021
@goodboy goodboy changed the title Multi-process-native debugger features Even more multi-process-native debugger features Dec 21, 2021
@goodboy goodboy changed the title Even more multi-process-native debugger features REPL-drive, multi-process-native debugger features Dec 21, 2021
@goodboy goodboy changed the title REPL-drive, multi-process-native debugger features REPL-driven, multi-process-native debugger features Dec 21, 2021
@goodboy goodboy added debugger and removed debugging labels Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugger discussion enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant