我在MacOS Sierra上使用rbenv。
以下是我的Rails服务器配置的配置:
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"useBundler": true,
"program": "${workspaceRoot}/bin/rails",
"args": [
"server"
]
}
我已经为" args"尝试了以下值键:
"args": [
"server",
"-p 4002"
]
但我会收到以下错误:
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
答案 0 :(得分:1)
我发现-p 4002
包含两个参数:-p
标志和4002
标志值;这不是一个完整的论点。
工作配置:
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"useBundler": true,
"program": "${workspaceRoot}/bin/rails",
"args": [
"server",
"-p",
"4002"
]
}