Small Linux debug overlay for the app you are currently focused on.
It stays on top of the screen, stays compact when things are normal, and expands into a diagnosis panel when it catches something odd like high CPU, rising memory, disk pressure, or log/network signals.
This overlay watches the currently focused app and shows:
- app name
- focused PID
- app-level CPU usage
- app-level RSS memory
- short diagnosis when an alert is triggered
For apps like Firefox, Chrome, VS Code, and other multi-process apps, the overlay does not rely only on one child PID. It tries to group related processes so the numbers are more useful.
This project is meant for Linux.
You need:
- Python 3
- Tkinter for Python
xdotool
The overlay uses:
/procfor process informationxdotoolto detect the active window PIDjournalctlfor recent log-based alerts
If journalctl is not available, the overlay will still run, but log-based alerts may not work properly.
git clone https://github.com/codeafridi/Debug-Overlay-App.git
cd Debug-overlayOn Ubuntu / Debian:
sudo apt update
sudo apt install python3 python3-venv python3-tk xdotoolOn Arch:
sudo pacman -S python tk xdotoolOn Fedora:
sudo dnf install python3 python3-tkinter xdotoolIf you already have Python and Tkinter working, the only thing people usually miss is xdotool.
From the project folder:
python3 -m venv venvsource venv/bin/activateRight now this project mainly uses the standard library, so there is not much to install through pip.
If later you add more dependencies, this is where users would install them.
You do not need to start a separate server for the current version.
Just run:
./start_overlay.shThat script:
- checks for
xdotool - uses the local virtual environment if it exists
- starts
overlay_design.py
If the script is not executable on your machine, run:
chmod +x start_overlay.sh
./start_overlay.shWhen nothing important is happening, the overlay stays in a compact transparent state.
You will usually see:
- app name
- focused PID
- CPU
- RSS memory
- current state like
STABLE
When something is detected, the overlay expands and shows diagnosis details.
This can include:
- CPU watch
- memory watch
- disk watch
- network watch
- log alert
- app event / crash-like change
- drag the overlay to move it
FRZfreezes the live updatesMOREexpands the details panel
When frozen:
- the overlay stops updating
- you can inspect the current diagnosis without it changing
The memory value shown in the overlay is RSS.
In this project that means:
- resident memory currently in RAM
- grouped across related app processes
- not just one child PID
- not virtual memory
So if the app is multi-process, the RSS number can look bigger than one single process shown in top, because the overlay is showing grouped app memory.
This is normal.
Reasons:
- the overlay groups related processes for some apps
topmay be showing one child process- CPU changes depend on the sampling window
- multi-process apps can shift work between helper processes
The overlay is meant to be useful and readable while you work, not a perfect clone of top.
Install it first:
Ubuntu / Debian:
sudo apt install xdotoolArch:
sudo pacman -S xdotoolFedora:
sudo dnf install xdotoolInstall the Tk package for Python.
Ubuntu / Debian:
sudo apt install python3-tkFedora:
sudo dnf install python3-tkinterArch usually ships Tk separately as:
sudo pacman -S tkCheck:
- you are running in a Linux desktop session
xdotoolworks in your environment- the app is not blocked by special sandboxing/window rules
You can test xdotool manually with:
xdotool getwindowfocus getwindowpidThat can happen with unusual sandboxed or multi-process apps. The grouping logic works well for many apps, but it is still best-effort.
overlay_design.py-> main overlay appstart_overlay.sh-> simple launcherprocess_time.py-> older standalone helper script / earlier experiment
If you just want the shortest version:
git clone https://github.com/codeafridi/Debug-Overlay-App.git
cd Debug-overlay
sudo apt install python3 python3-venv python3-tk xdotool
python3 -m venv venv
source venv/bin/activate
./start_overlay.shThat is all you need for the current version.