<

IntelliJ + TypeScript + Docker で Remote Debug (Break Point)

TL;DR

  1. Docker コンテナ上で、 ts-node-dev --inspect=0.0.0.0:9229 ./dist/index.js を実行
ts-node-dev
ts-node-dev
  1. IntelliJ 上で、Attach to Node.js/Chrome を実行

Run > Edit Configuration ... > +ボタン > Attach to Node.js/Chrome

Attach to Node.js/Chrome
Attach to Node.js/Chrome
  1. IntelliJ 上で BreakPoint を貼り、ブラウザにアクセス
IntelliJ Breakpoint
IntelliJ Breakpoint

※ Docker コンテナでは、アプリ用ポート(8080)と、inspect 用ポート(9229)を開放する必要あり

8080と9229portの開放
8080と9229portの開放

役立ったら、☕でサポートしてね!

シェアしよう

関連するタグ