How to make the debugging in playframework in IntelliJ Idea

后端 未结 9 2097
鱼传尺愫
鱼传尺愫 2020-12-07 17:19

Here we have a link

http://www.playframework.org/documentation/1.0.1/ide

about how to configure playframework to be working with different IDEs. There they

9条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 17:33

    Most convenient way to run/debug applications in intellij IDEA is the following.

    Menu command: Run -> Edit Configuration!

    Edit configuration

    Add new configuration -> Application

    Then fill up the fields:

    Main class:

    play.server.Server

    VM Parameters:

    -Dapplication.path=.

    You should have something similar:

    configuration screen

    If you did it correctly, then you can run and stop your app right from IDE

    EDIT for Play! 2

    Play 2 has good documentation for debugging. So go read it. But if you want to investigate run/debug buttons method - read further.

    It is different for Play 2.

    Settings:

    Main class:

    play.core.server.NettyServer or play.core.server.ProdServerStart

    VM Parameters:

    -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999 -Dapplication.path=.

    You still can debug your application by pressing debug button but I have not figured out some issues:

    • It always starts in PROD mode, so you can't make hot code changes.

    • RUNNING_PID. There is an error when you restart your debugging session saying that you have to delete this file.

提交回复
热议问题