4
3

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.

intellijでspring bootをdebugする

Last updated at Posted at 2018-04-16

はじめに

  • mavenでspringを起動する時にデバッグ用のパラメタを付ける
  • intellijのremoteデバッガを起動する
  • socketを経由してspring-boot:runの実行状態をintellijのデバッガでブレークポイントを扱えるようになる。

spring-boot:run

mvn clean spring-boot:run -Drun.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"

or

intellijのmaven実行画面に下記を設定して実行

  • Parameters > Command line: > spring-boot:run
  • Runner > VM Options: > -Drun.jvmArguments="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"

intellij remote

remote実行をパラメタをいじらずに追加後、実行。spring-boot:runが待機状態にならないうちに、remoteを実行するとエラーが出る。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?