Skip to content

Cannot trigger debugger from CodeLens #33

@frandegrandis

Description

@frandegrandis

Hi! I'm having issues trying to debug test using the debugger. Getting this error:
Screenshot 2024-06-17 at 16 29 12
Looking into the RubyLSP output i only see (there might be a typo rn because i have deleted some sensitive information):
2024-06-17 19:29:50.949 [info] Spawning debugger in directory /workspaces 2024-06-17 19:29:50.949 [info] Command bundle exec rdbg --open --command -- bundle exec bin/rspec /workspaces/spec/helpers/loans_helper_spec.rb:19 2024-06-17 19:29:50.949 [info] Environment {"HOSTNAME":"a4d7d9aa40c0","HOME":"/home/vscode","NVM_SYMLINK_CURRENT":"true","BUNDLE_APP_CONFIG":"/usr/local/bundle","NVM_DIR":"/usr/local/share/nvm","RUBY_DOWNLOAD_URL":"https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.4.tar.xz","RUBY_VERSION":"3.2.4","PATH":"/vscode/vscode-server/bin/linux-x64/611f9bfce64f25108829dd295f54a6894e87339d/bin/remote-cli:/usr/local/rvm/gems/default/bin:/usr/local/rvm/gems/default@global/bin:/usr/local/rvm/rubies/default/bin:/usr/local/share/rbenv/bin:/usr/local/share/nvm/current/bin:/usr/local/bundle/bin:/usr/local/rvm/gems/default/bin:/usr/local/rvm/gems/default@global/bin:/usr/local/rvm/rubies/default/bin:/usr/local/share/rbenv/bin:/usr/local/share/nvm/current/bin:/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/bin:/usr/local/rvm/bin","VSCODE_AGENT_FOLDER":"/home/vscode/.vscode-server","BUNDLE_PATH":"./vendor","MARKETING_DOMAIN":"","MY_RUBY_HOME":"/usr/local/rvm/rubies/default","LANG":"C.UTF-8","RAILS_LOG_LEVEL":"error","SHELL":"/bin/bash","GEM_HOME":"/usr/local/rvm/gems/default","RAILS_ENV":"test","SEED_GLS_ORGANIZATION_ID":"org_test","BUNDLE_GEMFILE":"/workspaces/.ruby-lsp/Gemfile","RUBY_DOWNLOAD_SHA256":"e7f1653d653232ec433472489a91afbc7433c9f760cc822defe7437c9d95791b","GEM_PATH":"/usr/local/rvm/gems/default:/usr/local/rvm/gems/default@global","PWD":"/workspaces","DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL":"true","BUNDLE_SILENCE_ROOT_WARNING":"1","RAILS_DEVELOPMENT_HOSTS":".githubpreview.dev,.preview.app.github.dev", VSCODE_HANDLES_SIGPIPE":"true","VSCODE_AMD_ENTRYPOINT":"vs/workbench/api/node/extensionHostProcess","VSCODE_HANDLES_UNCAUGHT_ERRORS":"true","VSCODE_NLS_CONFIG":"{\"locale\":\"en\",\"osLocale\":\"en\",\"availableLanguages\":{}}","NVM_RC_VERSION":"","rvm_prefix":"/usr/local","rvm_stored_umask":"0022","REMOTE_CONTAINERS_IPC":"/tmp/vscode-remote-containers-ipc-e5c07061-94bf-4b9d-943a-d6d5f5a22bf8.sock","rvm_version":"1.29.12 (latest)","rvm_user_install_flag":"0","LS_COLORS":"","rvm_bin_path":"/usr/local/rvm/bin","REMOTE_CONTAINERS_SOCKETS":"[\"/tmp/vscode-ssh-auth-e5c07061-94bf-4b9d-943a-d6d5f5a22bf8.sock\",\"/home/vscode/.gnupg/S.gpg-agent\"]","USER":"vscode","rvm_loaded_flag":"1","SHLVL":"1","NVM_CD_FLAGS":"","PROMPT_DIRTRIM":"4","rvm_path":"/usr/local/rvm","_":"/usr/local/bin/ruby","SSH_AUTH_SOCK":"/tmp/vscode-ssh-auth-e5c07061-94bf-4b9d-943a-d6d5f5a22bf8.sock","REMOTE_CONTAINERS":"true","BROWSER":"/vscode/vscode-server/bin/linux-x64/611f9bfce64f25108829dd295f54a6894e87339d/bin/helpers/browser.sh","VSCODE_CWD":"/vscode/vscode-server/bin/linux-x64/611f9bfce64f25108829dd295f54a6894e87339d","ELECTRON_RUN_AS_NODE":"1","VSCODE_IPC_HOOK_CLI":"/tmp/vscode-ipc-cbfc2a88-76e6-46b5-b9bc-2048adb2c42a.sock","VSCODE_L10N_BUNDLE_LOCATION":"","RUBYOPT":"--yjit","DISABLE_SPRING":"1"}
and my launch.json looks like:
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "rdbg", "name": "Attach with rdbg", "request": "attach" } ] }
I tried running bundle exec rdbg --open --command -- bundle exec bin/rspec /workspaces/spec/helpers/loans_helper_spec.rb:19 in terminal and attaching the vscode and it works fine.
Let me know if there is any other log that i can share to troubleshoot the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions