LoginSignup
1
0

More than 1 year has passed since last update.

fnmに切り替えたらVSCodeのF5実行できなくなった

Posted at

背景

こちらの記事を読ませていただいて、Windowsにてfnmを導入しました。
すると、VSCodeでF5によるJSファイル実行ができなくなってしまいました。
今後も毎回必要になりそうなので、解決策を自分の備忘録のために書いておこう、という記事です。

解決策

launch.jsonの設定を下記のようにする

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": "node",
      "request": "launch",
      "name": "Node: Current File (with FNM)",
      "skipFiles": [
        "<node_internals>/**"
      ],
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen",
      "program": "${file}",
      "runtimeExecutable": "fnm",
      "runtimeArgs": [
        "exec",
        "--using-file",
        "--",
        "node"
      ],
      "restart": true
    }
  ]
}

参考リンク

参考というか、上記のissueに答えてくださっている方がいてそのままやりました。
nameだけ自分が分かりやすいように変更してます。

fnmに変えたことが原因では?という発想に至るまでに無駄に時間がかかってしまい、fnmを検索キーワードに含めたらすぐ答えが見つかりました。。。

1
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
1
0