3
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 5 years have passed since last update.

(個人的メモ) Ubuntu | Xubuntu 18.04 上の Visual Studio Codeにおいて NVM でインストールした Node でデバッグする

Posted at

Ubuntu | Xubuntu で nvmを利用可能に source するスクリプトは、多くの人が恐らく ~/.bashrc に記載していると思います。

Visual Studio Codeのデバッガーは ~/.bashrc を読まないため、デバッグ実行しようとすると、 Cannot find runtime 'node' on PATH. とエラーメッセージが表示されます。

stackoverflow 等では、launch.jsonruntimeExecutable にフルパスで書け、とか書かれていますが、 launch.json をリポジトリーに上げている場合、そしてWindowsでも同じ launch.json を使用している場合、問題があります。

解決策

OSのメニューバー? やデスクトップアイコンから起動せずに、ターミナルから起動すれば node へのPATHが通るのでデバッグできるようになります。

$ code
  • 最近の code コマンドは code& としなくても、即座に返ってくるようです。

参考

UbuntuにNode.jsをインストールする

3
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
3
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?