cyrus-and / gdb-dashboard

Modular visual interface for GDB in Python
MIT License
11.11k stars 781 forks source link

Error in vscode IDE : Inappropriate ioctl for devicee #172

Closed thknx closed 4 years ago

thknx commented 4 years ago

gdb-dashboard works with standart terminals, but when I run it in vscode IDE, DebugConsole gives me there errors:

(Not: I tried on XOrg, I am using Debian10)


e[31mCannot write the dashboard
Traceback (most recent call last):
  File "<string>", line 496, in render
  File "<string>", line 589, in get_term_size
OSError: [Errno 25] Inappropriate ioctl for device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 498, in render
  File "<string>", line 589, in get_term_size
OSError: [Errno 25] Inappropriate ioctl for devicee[0m

This is my env: SHELL=/bin/bash SESSION_MANAGER=local/debian:@/tmp/.ICE-unix/1008,unix/debian:/tmp/.ICE-unix/1008 QT_ACCESSIBILITY=1 COLORTERM=truecolor XDG_MENU_PREFIX=gnome- TERM_PROGRAM_VERSION=1.40.1 GNOME_DESKTOP_SESSION_ID=this-is-deprecated SSH_AUTH_SOCK=/run/user/1000/keyring/ssh DESKTOP_SESSION=gnome NO_AT_BRIDGE=1 GTK_MODULES=gail:atk-bridge XDG_SEAT=seat0 PWD=/space/mars/xv6-public XDG_SESSION_DESKTOP=gnome LOGNAME=mdddd XDG_SESSION_TYPE=wayland GJS_DEBUG_TOPICS=JS ERROR;JS LOG GDM_LANG=en_US.UTF-8 HOME=/home/mdddd USERNAME=mdddd LANG=en_US.UTF-8 XDG_CURRENT_DESKTOP=GNOME WAYLAND_DISPLAY=wayland-0 CHROME_DESKTOP=code-url-handler.desktop GJS_DEBUG_OUTPUT=stderr XDG_SESSION_CLASS=user TERM=xterm-256color USER=mdddd DISPLAY=:0 SHLVL=1 XDG_VTNR=2 XDG_SESSION_ID=2 XDG_RUNTIME_DIR=/run/user/1000 XDG_DATA_DIRS=/home/mdddd/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/ PATH=/home/mdddd/.local/bin:/home/mdddd/.local/bin:/home/mdddd/bin:/home/mdddd/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games GDMSESSION=gnome DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus GIO_LAUNCHED_DESKTOP_FILE_PID=3600 GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/code.desktop TERMPROGRAM=vscode =/usr/bin/env

cyrus-and commented 4 years ago

I doubt that running the dashboard inside vscose is a viable setup. The dashboard needs a proper TTY and apparently vscode is not providing one.

thknx commented 4 years ago

I doubt that running the dashboard inside vscose is a viable setup. The dashboard needs a proper TTY and apparently vscode is not providing one.

Then why gdb-dashboard works on MacOS with same vscode =)

cyrus-and commented 4 years ago

Different implementations of the "DebugConsole"? I don't know, I'm not a vscode user myself, let me try to reproduce this...

thknx commented 4 years ago

By the way, I use C/C++ Extension (by Microsoft) with below configuration: I have .gdbinit in my folder which does remote debug session. So when I press vscode-debug button it automaticly connects to remote gdb session (I mean without manually run gdb from terminal inside vscode)

# launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "C++ Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/kernel",
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}/",
            "linux": {
                "MIMode": "gdb"
            },
            "symbolLoadInfo": {
                "loadAll": true,
            },
          }
    ]
}
cyrus-and commented 4 years ago

In any case even without that error the GDB terminal you end up with runs the GDB/MI interface meaning that you cannot just type commands (you need to use the -exec <command> syntax) plus you won't have the tab-completion. Last but not least (at least in my case) ANSI codes doesn't work...

cyrus-and commented 4 years ago

The fix should avoid that error but I repeat that IMHO what you're trying to do is not a reasonable setup.