debug icon indicating copy to clipboard operation
debug copied to clipboard

rdbg fails loading

Open oliviermilla opened this issue 3 years ago • 2 comments

Your environment

  • ruby -v: ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-linux]
  • rdbg -v: 1.5.0

Describe the bug I freshly installed debug, both as part of my Rails Gemfile and globally (gem install debug).

When trying to launch from vscode configuration

{
            "type": "rdbg",
            "name": "Run rake test",
            "request": "launch",
            "command": "rake",
            "script": "test",
            "useBundler": true,
            "args": [],
            "askParameters": false
    }

I get

Error: exit code is 127
Make sure to install rdbg command (`gem install debug`).
If you are using bundler, write `gem 'debug'` in your Gemfile.
[Start session]
{"_debugServiceProxy":{},"_id":"eda85310-be3e-470d-9904-cc83907bd4b7","_type":"rdbg","_name":"Run rake test","_workspaceFolder":{"uri":{"$mid":1,"fsPath":"/home/liedergram/crypto-export-converter","external":"file:///home/liedergram/crypto-export-converter","path":"/home/liedergram/crypto-export-converter","scheme":"file"},"name":"crypto-export-converter","index":0},"_configuration":{"type":"rdbg","name":"Run rake test","request":"launch","command":"rake","script":"test","useBundler":true,"args":[],"askParameters":false,"__configurationTarget":5}}

Now, if I try to launch from the terminal rdbg -c -- bundle exec rake test

I get some frame but for some reason it does not run my code

[4, 13] in ~/.rbenv/versions/3.1.1/bin/rake
     4| #
     5| # The application 'rake' is installed as part of a gem, and
     6| # this file is here to facilitate running it.
     7| #
     8|
=>   9| require 'rubygems'
    10|
    11| Gem.use_gemdeps
    12|
    13| version = ">= 0.a"
=>#0    <top (required)> at ~/.rbenv/versions/3.1.1/bin/rake:9
  #1    [C] Kernel.load at ~/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/bundler-2.3.14/lib/bundler/cli/exec.rb:58
  # and 14 frames (use `bt' command for all frames)

I'm not sure how I got there. The installation is straightforward. I've removed and reinstalled all the gems as well.

Any help is appreciated. ❤️

oliviermilla avatar May 26 '22 15:05 oliviermilla

Thank you for your report. I'll check VSCode example.

BTW

I get some frame but for some reason it does not run my code

"continue" command does not work correctly? (doesn't run your code?)

ko1 avatar Jun 25 '22 18:06 ko1

If you are using bundler, write gem 'debug' in your Gemfile.

Let me clear: Do you contain gem 'debug' in your Gemfile?

ko1 avatar Jul 05 '22 18:07 ko1

Please reopen this issue if you have another comment.

ko1 avatar Sep 16 '22 08:09 ko1

I am experiencing this issue as well. I have tried adding debug to my gemfile and also installed it globally. I can run the rdbg command fine from terminal within vscode. However, whenever I try to launch or attach, I get exit 127. I have tried adding adding rdbg and debug to my path. Nothing I do allows the vscode debugger to use it.

tunacasserole avatar Apr 11 '24 17:04 tunacasserole

I cannot seem to re-open this issue.

tunacasserole avatar Apr 11 '24 17:04 tunacasserole