vscode-rdbg icon indicating copy to clipboard operation
vscode-rdbg copied to clipboard

How do you run in console, having trouble loading project gems/bundler

Open daapower opened this issue 1 year ago • 6 comments

Historically I have been using pry to debug in console. I am trying to do something similar with rdbg where I can launch from console and run specific class and functions. I'm using the below in my configuration but it has trouble loading gems I think?

    {
        "type": "rdbg",
        "name": "Launch Rails Console",
        "request": "launch",
        "command": "bin/rails",
        "args": ["--", "--noautocomplete"],
        "script": "console",
        "useBundler": false,
        "rdbgPath": "my path"
      }    

I run into the following error, image

If I step over, I run into this error image

I don't have these issues if I just startup rails console. What am I doing wrong? Thank you

daapower avatar May 08 '23 23:05 daapower

If I use the following configuration, it loads and allows me to run code in the terminal but the breakpoints don't trigger

{ "type": "rdbg", "name": "Launch Rails Console 2", "request": "launch", "command": "my path to rails", "script": "console", "useBundler": true, "useTerminal": true, "rdbgPath": "my path to rdbg" }

daapower avatar May 09 '23 23:05 daapower

Thank you for reporting. Unfortunately, I cannot reproduce your problem so far. Could you give us details on how to reproduce it?

ono-max avatar Jun 19 '23 01:06 ono-max

Here is a step I tried.

  1. Configure json files as follows:
{
        "type": "rdbg",
        "name": "Launch Rails Console",
        "request": "launch",
        "command": "bin/rails",
        "args": ["--", "--noautocomplete"],
        "script": "console",
        "useBundler": false,
        "rdbgPath": "my path"
      }    

  1. Click "Pause"
  2. Paused at as follows:

Screen Shot 2023-06-19 at 11 00 44

ono-max avatar Jun 19 '23 02:06 ono-max

If I use the following configuration, it loads and allows me to run code in the terminal but the breakpoints don't trigger

Breakpoints work in my environment, though 🤔

ono-max avatar Jun 19 '23 02:06 ono-max

I tried your JSON file but getting this error now

image

daapower avatar Jun 19 '23 04:06 daapower

Could you try the following script to see if an error occurs?

a=1
b=2
c=3
d=4

ono-max avatar Jun 27 '23 02:06 ono-max