Debug Playframework in Eclipse

前端 未结 7 1656
庸人自扰
庸人自扰 2021-01-30 13:17

I just moved from Netbeans to Eclipse. In Netbeans, I can debug Playframework applications out of the box. However, in Eclipse, it seems hard to configure this in order to debug

7条回答
  •  北恋
    北恋 (楼主)
    2021-01-30 13:58

    As of Play 2.1.2, I was getting the 'address in use' error when running play debug run.

    The fix was to edit play.bat in play-2.1.2 directory and change these two lines:

    :setDebug
    set JPDA_PORT=9999
    

    to

    :setDebug
    set JPDA_PORT=8551
    

    Then in Eclipse, select Debug Configurations, find "Remote Java Application", do New. Then set port to 8551. Now you can start play using

    play debug run
    

    And then in Eclipse start debugging using the debug configuration you created about.

提交回复
热议问题