Skip to content

Consideration for ANSI output over IPC / "next-gen" remote debugging #1204

@goodboy

Description

@goodboy

Hey @jonathanslenders 😸

I was wondering what you thought about the idea of formalizing an API / configuration that would make it possible run ptk in a remote process and ship output over an IPC channel such that native remote debugging with things like coolio tab completion and syntax highlighting can be a thing; bringing the wonder of Python's interactivity to distributed systems dev.


I've got a couple issue written up that cover my research up to this point:

As far as I gather ptk is pretty much the project (even outside python) capable of this feat and so I thought I'd start here :)

I'll requote:

The problem

Standard fancy (read human enhanced) debugger repls (including the stdlib's pdb which uses rlcompleter, and pdb++) rely on libraries such as GNU readline to get things like completion and CLI "editting controls". There seems to be no way to get these features with readline based systems in a remote debugging context since Python's use of readline requires that the process is launched under a tty/pty system. Ideally these features are available in such use cases to make debugging of remote systems sane and efficient for the user.


I'll re-summarize a few things we've discovered poking around these repos and which we've already listed in the above issues:

Would be greatly interested in what other things I've missed and any further input you might have.
Also I can add the explicit issue/repo links to that list if this issue is something you deem worth tracking.


Also a couple things wrt projects built on top of ptk (or wanting to support it):

Also fwiw I have tried out ptpdb and I think it's super slick but, it might just be a bit too much as a default, with the full terminal UI and all (though having that kind of full UI glory is definitely nice to have if the user so chooses).

One of the critical UX things I'm hoping for is the ability to work with a prompt while other asynchronous things are writing to the local tty and not having that prompt get clobbered. I pointed above to a couple things above but I'm hoping you can give me even more pointers on how to accomplish this 🕵️.

Look forward to your thoughts 🏄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions