0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Windows VSCode環境で"Debugger terminal error: Process failed: spawn bundle ENOENT"

Posted at

お困りごと

Windows VSCodeでRubyをデバッグしたい。
まずは、bundlerを介した環境でデバッグしたいため、launch.jsonのuseBundlertrue で設定することからスタート

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": [
        {
            "name": "Debug Local File",
            "type": "Ruby",
            "request": "launch",
            "program": "${workspaceRoot}/main.rb",
            "useBundler": true
        }
    ]
}

いざ、デバッグを開始するとVSCodeのDEBUG CONSOLEに以下のエラーが表示される。

Debugger terminal error: Process failed: spawn bundle ENOENT

swpawnは日本語で"生成"、 "ENOENT"はError No Etry"の略らしい
意訳すると、「bundleプロセス生成しようとおもったけど、見つかんない」といったところ。

解決策

bundleが呼び出せるようにする記述をlaunch.jsonに記述する。
pathToBundlerの部分がその記述。

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": [
        {
            "name": "Debug Local File",
            "type": "Ruby",
            "request": "launch",
            "program": "${workspaceRoot}/main.rb",
            "useBundler": true,
            "pathToBundler": "bundle.bat"
        }
    ]
}

以上

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?