-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
When debugging a GUI application this is typically supposed to run inside a desktop environment.
In an SSH session there's no such desktop environment, so the usual scenario you want is
- You're logged into the target machine through a different connection having a desktop session
e.g. remote desktop (rdp/vnc) or the virtual display of a VM - In order for the debugged app to appear in that desktop session, a number of environment variables need to be set
The usually required ones are:DISPLAYWAYLAND_DISPLAYDBUS_SESSION_BUS_ADDRESSXDG_RUNTIME_DIRXDG_CURRENT_DESKTOPXAUTHORITY- (and others)
The latter one (XAUTHORITY) is of special interest, because it often changes per session (but there may be others as well).
Proposed Solution
Introduce a Copy Environment From feature.
It would work like this:
- Add a
CopyEnvironmentFromproperty to the debug profile - User can enter the name of a process
which will be something like: Xwayland, gnome-shell, plasmashell, ksmserver, xfce4-session, sway, wayland-desktop, kwin_wayland, kwin_x11, Xorg - Before launching the debugger, the extension executes a script over ssh which
- finds the id of a running process of that name (and is owned by the same user)
- executes
cat /proc/{pid}/environ
- Then, the extension will add all those variables (except those which are explicitly specified in the profile) to the debugger launch command
Metadata
Metadata
Assignees
Labels
No labels