inducer / pudb

Full-screen console debugger for Python
https://documen.tician.de/pudb/
Other
2.94k stars 226 forks source link

Cross-platform #158

Open Doxly opened 8 years ago

Doxly commented 8 years ago

This module dosn't work on Windows, because it use some special code from linux. It must be written in system requements.

asmeurer commented 8 years ago

Supposedly urwid works in cygwin (I don't have Windows to test). Is there stuff specifically in pudb that assumes posix?

inducer commented 8 years ago

Don't think so.

techtonik commented 8 years ago

Port to https://github.com/nsf/termbox API?

inducer commented 8 years ago

Termbox would be something to consider at the urwid level, not at pudb's. A quick and dirty solution would be an ssh server (like pudb.remote), at which point we could make use , say, Putty's terminal emulation.

inducer commented 8 years ago

Whoops.

techtonik commented 8 years ago

What high-level API is needed for pudb? I see that uses 'loop' that is provided by any TUI framework. Is urwid strictly necessary? Maybe it is possible to replace its API calls with something that could be easily implemented on top of existing termbox or even curses modules.

inducer commented 8 years ago

Urwid isn't strictly necessary for pudb in the same way that Qt isn't strictly necessary for KDE.

asmeurer commented 8 years ago

Urwid is a GUI framework. It provides abstractions like dialogue boxes and input cells and handles things like resizing and arrowing automatically.

techtonik commented 8 years ago

@asmeurer dialog box abstraction that is POSIX-only seems very weird. Are there any abstractions that can work across different low level TUI backends?

asmeurer commented 8 years ago

@techtonik I think what you are basically looking for is urwid support in Windows. I would contact them about it (I did find that thread I linked to above, but it's from 2006). If urwid supported Windows pudb support would be basically automatic at that point.

techtonik commented 8 years ago

@asmeurer not sure guys want to mess with Windows internals - they have to port their inner loop and use Windows API. It is more effective to just build a system where event loop is decoupled from widget library.

CMcNaughty commented 4 years ago

As this was never fixed, can the documentation please be updated to make it clear that this is a linux only tool out of the box?

inducer commented 4 years ago

this is a linux only tool out of the box?

It isn't. Works on Macs for sure. WSL1/2 also. Might work on Windows by using a Telnet client with the remote debugging support.

CMcNaughty commented 4 years ago

this is a linux only tool out of the box?

It isn't. Works on Macs for sure. WSL1/2 also. Might work on Windows by using a Telnet client with the remote debugging support.

Apologies, you're correct. As a Windows user I can sometimes be a bit biased, sorry :/ I guess what I was trying to say was that I found it a little misleading trying to use this on Windows and couldn't find anything in the docs as to why a simple import pudb; pudb.set_trace() wasn't working. Requiring Windows users to either use telenet or cygwin rather than "just working out of the box" could at least be flagged in the documentation. This looks like a really cool tool and I was excited to use it but I can't see myself having the time to test and set it up correctly anytime soon. If I ever get around to that, I'd be happy to help you out with some Windows-specific documentation!

inducer commented 4 years ago

https://en.wikipedia.org/wiki/Windows_Terminal says it supports ANSI escape sequences, which IMO should be all that's needed to support Urwid. (Note that "Windows Terminal" is different from the "Command Prompt" app (cmd.exe) that ships with Windows.)

asmeurer commented 4 years ago

I suspect pudb is doing other things that won't work right on Windows. For example, the xdg stuff for the config is wrong for Windows.

daviewales commented 1 year ago

urwid might be getting closer to Windows support if this PR gets merged: https://github.com/urwid/urwid/pull/448 See also: https://github.com/urwid/urwid/issues/447

penguinolog commented 9 months ago

urwid obtained basic Windows support (tested on example applications) in master branch and soon should have new release. During test run, pudb UI stuck and ignored keyboard input.

inducer commented 9 months ago

I still don't have a Windows machine (nor the time/inclination to troubleshoot Windows), so someone else would need to spearhead this.

asmeurer commented 9 months ago

Any issues with the UI or things like keyboard input would most likely be upstream urwid bugs. If there's problems with the debugger itself or things like saving settings that would be an issue in pudb.