b6702c381ec9b6c067f2548a704c7514e16a2b39
- lightgui/debugger.py: PdbSession driving python3 -m pdb in a subprocess (start/run/restart, break/enable/disable/clear, continue, step into/over/out, stack, locals, watches, stop). State machine idle/running/stopped/exited; stop kills the whole process group (SIGTERM then SIGKILL) so Stop can never hang on a GUI app; Run from Stopped/Exited restarts with the current target and re-applies breakpoints; no temp breakpoints (stop-on-entry uses pdb's natural first stop, break-on-main is persistent). - lightgui/debugger_ui.py: debugger window mirroring the C layout (toolbar, Target row, status, breakpoints left, locals/watches/ stack right, output console). Breakpoint pane 420px / 320px location column; in-place row updates + id-based selection restore; checkbox toggles apply to the session first; watch and locals trees have search disabled (no search popup on click). - lightgui/install_libs.py: Install Libraries flow (package to system site-packages, launcher to /usr/local/bin, .desktop to /usr/local/share/applications); pkexec first, sudo -S fallback with an Enter-submits password dialog; dry-run plan shown in the dialog. pkexec is not installed on the server (same honest limit as the C/Rust fix). - app.py: Debug menu (Start Debugging, Toggle Breakpoint, Step Into/Over/Out, Continue, Stop) + Tools > Install Libraries; debugger stop scrolls the Code window to the stopped line. - tests: 38 new tests (debugger session incl. breakpoint hit, step over/into/out, locals, watches, continue to end, stop kills the debuggee, restart from Exited, enable/disable; install dry-run command construction/file list/paths). Full suite: 239 tests pass.
LightGUI — Python port
A Python port of the LightGUI GUI designer: https://github.com/cnmcdee/lightgui (C++/GTK) and https://github.com/cnmcdee/lightgui_rust (Rust port).
Architecture (decided by the user)
- IDE chrome in GTK via PyGObject (menus, palette, canvas frame, Inspector, code view, dialogs).
- All widgets home-brewed XFrame in Python — the same architecture as the C and Rust designers: GTK is chrome only, the canvas is XFrame-native.
- Generated code is Python using the Python XFrame widgets (the mirror of the C++ codegen).
- Widget model follows the Rust port's archetype approach: a small set of archetype
classes parameterised by a
kindstring, with data-driven property tables — not 547 separate widget classes. The C designer is the canonical reference for behaviour; the Rust port is the reference for structure.
Requirements
- Python 3.10+
- PyGObject (
python3-gi, GTK 3) - pycairo (
python3-cairo) — the XFrame widgets draw with Cairo python3-gi-cairo— the PyGObject/Cairo bridge; without it the canvasdrawsignal fails with "Couldn't find foreign struct converter for 'cairo.Context'"- GTK 3.24
On Debian/Ubuntu/Parrot:
sudo apt install python3-gi python3-cairo python3-gi-cairo gir1.2-gtk-3.0
Run
./ide
Layout
lightgui/
__init__.py version
__main__.py entry point
app.py Application, main window assembly (IDE chrome)
model.py project model: placed widgets, selection, .fdj place file
theme.py IDE theme (designer chrome only, not the generated app)
preferences.py preferences
project_io.py .fdj load/save
props.py property tables (generic set + per-widget), data-driven
xframe/
core.py XFrame core: widget base, registry, draw dispatch
canvas.py canvas (Gtk.DrawingArea), placement, selection, handles
palette.py palette data (583 entries)
archetypes.py archetype widget classes (button, entry, label, ...)
widgets.py generic widget draw implementations
drawings.py shared drawing helpers (from C drawings.h)
indicators.py indicator drawing (from C indicators.h)
stock.py Stock widgets (37)
instruments.py Instrumentation widgets (66)
inspector.py Object Inspector window
codeview.py code view with gutter/folding
generator.py Python codegen
debugger.py pdb-based step debugger session
debugger_ui.py debugger UI
build.py run/build flow for Python apps (replaces CMake build)
install_libs.py Install Libraries flow (system-wide install, root prompt)
Status
Port in progress. See docs/architecture.md for the port plan and per-phase status.
Languages
Python
99.9%