LoginSignup
0
0

More than 1 year has passed since last update.

VSCodeで利用したいnodejsを指定してデバッグ実行する

Posted at

nodejs上で動作するプログラムをVSCodeでデバッグ実行する際に、デフォルトだとpwa-nodeというVSCodeに組み込まれたnodejsが利用されます。

nodejsの特定のバージョンを指定して実行したい場合は、そのバージョンのnodejsをインストールし、.vscodeフォルダにあるlaunch.jsonファイルで、runtimeExecutableにインストールしたnodejsのパスを指定することで実現できます。

{
    ・・・
    "type": "pwa-node",
    "runtimeExecutable": "/Users/someone/.nvm/versions/node/v12.14.0/bin/node"
}
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