ses
ses

Reputation: 13342

PlayFramework 2.4.x ide debug

Is that possible to debug in playframework 2.4.x ? (x = 3 in my case) ?

IntelliJ IDEA 14.1.5

I'm following this link/doc: https://www.playframework.com/documentation/2.4.x/IDE

Create a new Run Configuration – From the main menu, select Run -> Edit Configurations Click on the + to add a new configuration From the list of configurations, choose “SBT Task” In the “tasks” input box, simply put “run” Apply changes and select OK. Now you can choose “Run” from the main Run menu and run your application

You can easily start a debugger session for a Play application using default Run/Debug Configuration settings.

No luck so far for IntelliJ IDEA. When run as / press debug it does not drop me to debug break-poitns in IDE in my controller code when I got my get/post requests.

UPDATE: One more try with same result (see screenshot) with adding play2 debug configuration (following: https://www.jetbrains.com/idea/help/getting-started-with-play-2-x.html):

enter image description here

If I change 2.4.3 to 2.4.2:

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.3")

or in: addSbtPlugin("com.typesafe.play" % "sbt-fork-run-plugin" % "2.4.3")

same result.Or if I put JVML levelt to java 7.

It will be hard to convince a team to migrate a project from tomcat to play :) No out-of-the box magic.

And that "Setting up Play fork run ... " massage in logs that eats all processors for many seconds makes it even harder.

Upvotes: 0

Views: 234

Answers (1)

ses
ses

Reputation: 13342

Something weired happanes anyhow. Inititally I have createad my project from Play Activator as typical scala-play project.

But now when I created it from IDE New->Project->Scala->Play 2.x, then it works with debugging on out of the box.

If one figures out what is difference would be nice (even if that guy is me, from the Future). Seems guys from JetBrains care more about IDE integratiion than guys from TypeSafe ;).

Maybe the reason is in plugins.sbt

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8")

that what my IDE uses by default.

Or maybe it has somethign to do with this routing and IoC

For now I'm suttisfied. Thinking that 2.4.x is not ready to be used (at least not in convicing someone in something).

Update

Comment the following out and breakpoints work again:

addSbtPlugin("com.typesafe.play" % "sbt-fork-run-plugin" % "2.4.6")

Upvotes: 0

Related Questions