-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add a custom backend for Kernel.dbg/2 #191
Conversation
lib/kino/debug.ex
Outdated
case ast do | ||
{:|>, _meta, _args} -> | ||
quote do | ||
if pid = unquote(__MODULE__).lookup_dbg_handler(unquote(dbg_id)) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick question: what happens if dbg
was invoked from a separate process? Do we also want to show the "fancy" version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually that's an interesting case, I would say there is no reason to differentiate that, however the relevant detail is that the started kino is tied to the process lifetime, so when debugging a process that crashes this is an issue.
Btw, ehe "Copy new pipeline" text should also be clickable :) It would also be great if we could use keyboard navigation once a pipe is focused! |
Finally, after playing with it for a little bit, I think we should do some final changes to the selector. First, if there is an error and the error is fixed, we should automatically select the last row. Second, take this example: If I drag the fourth (last) item to the second position, then the new fourth item should remain selected. I.e. the selector should be a property of the row (like the 4th row) not of the pipe entry. (I would argue that perhaps any operation should always select the last line, but I think you will find that too strict? :D) |
Co-authored-by: José Valim <[email protected]> Co-authored-by: Hugo Baraúna <[email protected]>
@josevalim there are cases where tracking selection on row basis is also unintuitive. For example: When we move filter above shuffle, it makes more sense to keep map selected to see what impact filter had, rather than to select shuffle. I actually think that always selecting the last one is less arbitrary than that, so it's fine by me :) |
Co-authored-by: José Valim <[email protected]>
FTR I added tests and a demo to the PR description :) |
Registers a custom backend for
Kernel.dbg/2
. For pipelines it renders an interactive editor, otherwise it renders the result with theKino.Render
protocol.kino_dbg.webm