我在 MacOS Sierra 上并使用 rbenv。
这是我的 Rails 服务器配置:
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"useBundler": true,
"program": "${workspaceRoot}/bin/rails",
"args": [
"server"
]
}
Run Code Online (Sandbox Code Playgroud)
我已经为“args”键尝试了以下值:
"args": [
"server",
"-p 4002"
]
Run Code Online (Sandbox Code Playgroud)
但我会收到以下错误:
Exiting
bundler: failed to load command: rdebug-ide (/Users/knockycode/vendor/bundle/bin/rdebug-ide)
Uncaught exception: cannot load such file -- rack/handler/-p 4002
Run Code Online (Sandbox Code Playgroud)