I have been trying to set up the debugger, or something alike, so I can test my code while I start to learn the language ruby
.
I have read dozens of tutorials, and still now I did not manage to understand how to get this to work.
- I have downloaded the two gems indicated + ruby extension for vscode, as per recommended in several tutorials.
gem install ruby-debug-ide
gem install debase
I have created a
vs.code
file with a{}launch.json
file inside.on the
{} launch.json
file I have typed the following code:
"version": "0.2.0",
"configurations": [
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/rails",
"args": ["server"]
}
]
}
When I run the debugger I get the following feedback on the DEBUG CONSOLE: Debugger terminal error: Process failed: spawn rdebug-ide ENOENT
I am looking for a solution that lets me see the output of functions, variables, etc, like we do on javascript, using console.log()
. I guess it is the equivalent to puts()
, or prints()
on ruby
.
Please let me know if I have to set something else besides the debugger in order to have specific output of my code, as per stated above.
Really desperate with this at this point. Thanks in advance to all!