Skip to content

Debugger (mostly) silently failing to run #1709

@AustinMcCallister

Description

@AustinMcCallister

Hello,

I'm trying to set up the debugging functionality of this plugin, but when I attempt to run it, the process just quits with error code 1 and the output doesn't give any indication of what is causing the error

Ruby LSP> Trying to activate Ruby environment with command: /usr/bin/zsh -ic 'eval "$(rtx env -s zsh)" && ruby -rjson -e "printf(%{RUBY_ENV_ACTIVATE%sRUBY_ENV_ACTIVATE}, JSON.dump(ENV.to_h))"' inside directory: /home/slysoft/Documents/Odin Project/Ruby/ruby-exercises
Ruby LSP> Skipping lockfile copies because there's no top level bundle
Ruby LSP> Running bundle install for the custom bundle. This may take a while...
Ruby LSP> Command: ((bundle check && bundle update ruby-lsp debug) || bundle install) 1>&2
The Gemfile's dependencies are satisfied
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Bundler attempted to update ruby-lsp but its version stayed the same
Bundler attempted to update debug but its version stayed the same
Bundle updated!
Starting Ruby LSP v0.12.3...
Ruby LSP is ready
Ruby LSP> Spawning debugger in directory /home/slysoft/Documents/Odin Project/Ruby/ruby-exercises
Ruby LSP>   Command bundle exec rdbg --open --command --sock-path=/tmp/ruby-lsp-debug-sockets/ruby-debug-ruby-exercises-0.sock -- ruby /home/slysoft/Documents/Odin Project/Ruby/ruby-exercises/script.rb
Ruby LSP>   Environment {"SHELL":"/usr/bin/zsh","SESSION_MANAGER":"local/arch:@/tmp/.ICE-unix/907,unix/arch:/tmp/.ICE-unix/907","XDG_CONFIG_DIRS":"/home/slysoft/.config/kdedefaults:/etc/xdg","XDG_SESSION_PATH":"/org/freedesktop/DisplayManager/Session1","GLFW_IM_MODULE":"ibus","DOTNET_ROOT":"/usr/share/dotnet","MEMORY_PRESSURE_WRITE":"c29tZSAyMDAwMDAgMjAwMDAwMAA=","ELECTRON_RUN_AS_NODE":"1","XMODIFIERS":"@im=fcitx","DESKTOP_SESSION":"plasmawayland","LC_MONETARY":"ja_JP.UTF-8","GTK_RC_FILES":"/etc/gtk/gtkrc:/home/slysoft/.gtkrc:/home/slysoft/.config/gtkrc","NO_AT_BRIDGE":"1","XCURSOR_SIZE":"32","VSCODE_AMD_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","EDITOR":"nvim","XDG_SEAT":"seat0","PWD":"/home/slysoft/Documents/Odin Project/Ruby/ruby-exercises","XDG_SESSION_DESKTOP":"KDE","LOGNAME":"slysoft","XDG_SESSION_TYPE":"wayland","SYSTEMD_EXEC_PID":"4583","VSCODE_CODE_CACHE_PATH":"/home/slysoft/.config/Code/CachedData/d037ac076cee195194f93ce6fe2bdfe2969cc82d","_":"/home/slysoft/.local/share/rtx/installs/ruby/3.2.2/bin/ruby","XAUTHORITY":"/run/user/1000/xauth_YQQACD","MOTD_SHOWN":"pam","GTK2_RC_FILES":"/etc/gtk-2.0/gtkrc:/home/slysoft/.gtkrc-2.0:/home/slysoft/.config/gtkrc-2.0","HOME":"/home/slysoft","LC_PAPER":"ja_JP.UTF-8","LANG":"en_US.UTF-8","XDG_CURRENT_DESKTOP":"KDE","VSCODE_IPC_HOOK":"/run/user/1000/vscode-e1f3f0d3-1.84-main.sock","MEMORY_PRESSURE_WATCH":"/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/background.slice/plasma-krunner.service/memory.pressure","WAYLAND_DISPLAY":"wayland-0","VSCODE_CLI":"1","XDG_SEAT_PATH":"/org/freedesktop/DisplayManager/Seat0","INVOCATION_ID":"d5243905ea79456287414f19e3e7e024","MANAGERPID":"778","BAT_THEME":"Nord","DOTNET_BUNDLE_EXTRACT_BASE_DIR":"/home/slysoft/.cache/dotnet_bundle_extract","CHROME_DESKTOP":"code-url-handler.desktop","KDE_SESSION_UID":"1000","XDG_SESSION_CLASS":"user","USER":"slysoft","PLASMA_USE_QT_SCALING":"1","KDE_SESSION_VERSION":"5","PAM_KWALLET5_LOGIN":"/run/user/1000/kwallet5.socket","QT_WAYLAND_FORCE_DPI":"96","DISPLAY":":1","VSCODE_PID":"10712","SHLVL":"1","MOZ_ENABLE_WAYLAND":"1","DOTNET_CLI_TELEMETRY_OUTPUT":"1","LC_MEASUREMENT":"ja_JP.UTF-8","VSCODE_CWD":"/home/slysoft","XDG_VTNR":"1","XDG_SESSION_ID":"2","VSCODE_CRASH_REPORTER_PROCESS_TYPE":"extensionHost","XDG_RUNTIME_DIR":"/run/user/1000","DEBUGINFOD_URLS":"https://debuginfod.archlinux.org","LC_TIME":"ja_JP.UTF-8","ELECTRON_NO_ATTACH_CONSOLE":"1","QT_AUTO_SCREEN_SCALE_FACTOR":"0","JOURNAL_STREAM":"8:67095","XCURSOR_THEME":"Nordzy-cursors-white","KDE_FULL_SESSION":"true","GDK_BACKEND":"x11","PATH":"/home/slysoft/.local/share/rtx/installs/ruby/3.2.2/bin:/home/slysoft/.local/bin:/home/slysoft/.local/share/gem/ruby/3.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/slysoft/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin","ORIGINAL_XDG_CURRENT_DESKTOP":"KDE","DBUS_SESSION_BUS_ADDRESS":"unix:path=/run/user/1000/bus","VSCODE_NLS_CONFIG":"{\"locale\":\"en-us\",\"osLocale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}","KDE_APPLICATIONS_AS_SCOPE":"1","MAIL":"/var/spool/mail/slysoft","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","LC_NUMERIC":"ja_JP.UTF-8","OLDPWD":"/home/slysoft/Documents/Odin Project/Ruby/ruby-exercises","P9K_SSH":"0","_P9K_SSH_TTY":"","SSH_AUTH_SOCK":"/tmp/ssh-XXXXXXgZbx0K/agent.7809","SSH_AGENT_PID":"7810","RTX_SHELL":"zsh","RUBYLIB":"/home/slysoft/.local/share/rtx/installs/ruby/3.2.2/lib/rubygems_plugin","RUBYOPT":"--yjit","BUNDLE_GEMFILE":"/home/slysoft/Documents/Odin Project/Ruby/ruby-exercises/.ruby-lsp/Gemfile"}

The debug gem is installed and rdbg is on PATH.

I am using the following default launch options:

"launch": {
  "version": "0.2.0",
  "configurations": [
    {
      "type": "ruby_lsp",
      "request": "launch",
      "name": "Debug",
      "program": "ruby ${file}"
    },
    {
      "type": "ruby_lsp",
      "request": "launch",
      "name": "Debug test file",
      "program": "ruby -Itest ${relativeFile}"
    },
    {
      "type": "ruby_lsp",
      "request": "attach",
      "name": "Attach to existing server",
    }
  ]
}

Any help / insight would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions