LoginSignup
0
0

More than 5 years have passed since last update.

リモートホスト上のNodeJSからローカルのchromeでデバッグする

Posted at

リモート環境:centos6.10 (vagrant)

「node --inspect=0.0.0.0:9229 --inspect-brk helloworld.js」

をhelloworld.jsのあるフォルダ上から実行し、chromeのURLで「chrome://inspect/#devices」を開く。すると、Remote Target上にfile:///home/vagrant/nodejs/helloworld.js で表示されるので、それを開くとデバッグ画面を開くことができる。ちなみに--inspect-brkは、ファイルの最初の行にブレークポイントを仕掛けるということらしい。

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