vscode-rdbg
vscode-rdbg copied to clipboard
vscode-rdbg ignores `useBundler` and tries to run user or system `rdbg`
Here is the output I get when debugging a Ruby script.
"Running: /opt/local/bin/fish -lic rdbg --command --open --stop-at-load -- bundle exec ruby output:extension-output-KoichiSasada.vscode-rdbg-%231-rdbg"
warning: Could not set up terminal.
warning: TERM environment variable not set.
warning: Using fallback terminal type 'xterm-256color'.
fish: Unknown command: rdbg
fish:
rdbg --version
^~~^
Error: /opt/local/bin/fish -lic 'rdbg --version': 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]
{"id":"e966f69d-ce63-40e7-9e72-7d21e15bcc2a","type":"rdbg","name":"Debug current file with rdbg","workspaceFolder":{"uri":{"$mid":1,"fsPath":"/Users/luc/Developer/BGEE","external":"file:///Users/luc/Developer/BGEE","path":"/Users/luc/Developer/BGEE","scheme":"file"},"name":"BGEE","index":0},"configuration":{"type":"rdbg","name":"Debug current file with rdbg","useBundler":true,"script":"output:extension-output-KoichiSasada.vscode-rdbg-%231-rdbg","request":"launch","args":[],"askParameters":false,"__configurationTarget":6,"rdbgExtensions":["traceInspector"],"rdbgInitialScripts":[]}}
Why does it try to run /opt/local/bin/fish -lic rdbg when I specified that I wanted to use Bundler? As reported by vcode-rdbg itself. The hint "If you are using bundler, write gem 'debug' in your Gemfile" is completely misdirected too: I have gem 'debug' in my Gemfile. It goes without saying that bundle exec rdbg path/to/script.rb works in that project.
I have version 0.2.2
Here is a more readable rendering of my launch.json
{
// 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": "Debug current file with rdbg",
"useBundler": true,
"script": "${file}",
"request": "launch",
"args": [],
"askParameters": false
},
{
"type": "rdbg",
"name": "Attach with rdbg",
"request": "attach"
}
]
}