0
0

More than 1 year has passed since last update.

【VSCode】VSCodeでRailsのデバッグをする【Rails】

Posted at

debugをインストール


group :development do
  gem 'debug'
end

ターミナル
$ bundle install

launch.jsonを作成する

.vscode/launch.jsonを以下のとおり作成します。

.vscode/launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "rdbg",
            "name": "Debug current file with rdbg",
            "request": "launch",
            "script": "${file}",
            "args": [],
            "askParameters": true
        },
        {
            "type": "rdbg",
            "name": "Attach with rdbg",
            "request": "attach"
        }
    ]
}

Railsを起動

rdbg経由でRailsを起動します。

ターミナル
$ $ rdbg --open --command -- bundle exec rails server
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0