LoginSignup
13
14

More than 5 years have passed since last update.

Play Framework2.4 For Java デバッグ・ステップ実行

Last updated at Posted at 2015-09-28

前回、Play Framework2.4 For Java 開発環境
で開発環境が整ったので色々試したいところですが、Eclipseでデバッグする方法をまずは試してみます。

activator デバッグ起動

以下のコマンドでアプリをデバッグ起動する。
activator -jvm-debug 9999 run

ポート9999で起動します。

>activator -jvm-debug 9999 run
Listening for transport dt_socket at address: 9999
[info] Loading project definition from C:\tools\play\workspase\my-app\project
[info] Set current project to my-app (in build file:/C:/tools/play/workspase/my-app/)

--- (Running the application, auto-reloading is enabled) ---

[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Ctrl+D to stop and go back to the console...)

Eclipse デバッグ起動

・該当のプロジェクトを右クリック - [デバッグ] - [デバッグの構成] を選択
・リモートJavaアプリケーションを右クリックし、新規を選択
・ポートを9999に設定する。
・デバッグを押下する。
2015-09-28_232556.png

デバッグ・ステップ実行

準備が整ったので適当な箇所でブレークポイントを設定して、ブラウザからhttp://localhost:9000/hello_worldにアクセスする。

Eclipseのデバッグ画面が表示されてブレークポイントで処理が止まりました。
2015-09-28_233158.png

13
14
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
13
14