Doesn't work debug for play project in IDEA 14 Ultimate - scala

I do following steps:
Import to IDEA Play project generated with Activator UI from Play Scala Seed template.
Create Run/Debug configuragion using standart "Play 2 App" template.
Add break point in my project.
Run debug and open page in a browser.
I can see in IDE console "play - Application started", and debugger tells me
"Connected to the target VM, address: '127.0.0.1:58354', transport: 'socket'"
But program execution doesn't stop at my break points. In a browser I can see
what a code for that I've made a break point is executed.
What's wrong with IDEA?
I use play version 2.3.9, and I start the play app from an IDEA ide not from a play console.

seems duplicate with :
How to run Play Framework 2.x in debug mode in IntelliJ IDEA?
Your first step seems wrong. Just open (and don't import) your project is enough from IntelliJ.

Related

scala + play framework 2.5 - debugging don't working

I have problem with debugger in play framework 2.5 and scala. I use Intelij IDEA 2016.1 IDE, and when i try debug my applicaton, it never stops on break points. I try 2 options:
Run application directly from Intelij IDEA as Play2App i debug mode.
Run application from activator by activator -jvm-debug 9999 command, and connect from IDE as remote debug. Connection is succeed.
In both approach, application don't stop on break points.
If i debug standalone apliaction (with main function), or unit test, all work correctly.
Do you have any idea what can be wrong?
I use Eclipse and had the same issue with play 2.5.4.
Issue fixed after I removed "fork in run := true" from build.sbt
Hope it helps.

playframework 2.5.0 Template fail to compile (fresh one)

I would like to get started with play running play 2.5...
but even installing the template with activator "play-java" has an error.
Using unsupported version of Play: 2.5.0
I have downloaded the full activator package and the minimal.
Both fail on 2 machines(JDK 73).
NO clue how to catch up on this, perhaps some could help me out. I would appreciate it very much.
Bets regards
Using 'activator ui', causes the activator to cycle. The error message is "Getting 'Using unsupported version of Play: 2.5.0'". The issue tracking the problem is https://github.com/typesafehub/activator/issues/1102.
Using 'activator' without the ui argument is a work-around.
Change directories to the play-java directory and running ./activator without the ui argument. This brings up the sbt command line. Sbt commands help, about, tasks, update, compile, test, and run work. A web browser pointed at localhost:9000 will contain a text field with "You're using Play 2.5.0" as content.
The "run" command starts a Netty server. Application interaction is possible using localhost:9000 in a web browser.
As a workaround you can create a project without the UI by using something like
activator new my-app play-scala
Play framework requires java 8 since 2.4 version
https://www.playframework.com/documentation/2.4.x/Migration24#Java-8-support

Attaching a Remote Debug session to Spark from Eclipse Scala IDE

I've been wracking my brain over this for the last two days trying to get it to work. I have a local Spark installation on my Mac that I'm trying to attach a debugger to. I set:
SPARK_JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005
Then I submit my job to spark-submit and launch my debug configuration in eclipse which is configured as a Socket Attach Remote Debugging session. The debugger attaches, my job resumes and executes, but none of my breakpoints are ever hit, no matter what I do.
The only way I can get it to hit a breakpoint is by attaching to a spark-shell, creating a Java Exception breakpoint and issuing
throw new java.lang.Exception()
The debugger will not stop at normal breakpoints for me.
I created a standalone Hellow World scala app and was able to attach to it and have it stop at a regular breakpoint without any issues.
Environment: Mac OS, latest Eclipse, latest Scala IDE, Spark 1.3.1, Scala 2.10.5
Thanks in advance.
I had a similar issue and there were 2 things that fixed my problem -
1. The .jar file and source not a little out of sync for me , so had to recompile and redeploy.
2. Next On the JAVAOPTS I had a suspend=n.
After correcting these two it worked for me .

Setting up libgdx in IntelliJ Idea with GWT Support?

So far the documentation doesn't include the set up of GWT project in IDEA, and my limited google skill can't find the solution. Is it possible?
If you generated your libgdx project using the gdx-setup.jar file, then you should import your project by using the following link: https://github.com/libgdx/libgdx/wiki/Gradle-and-Intellij-IDEA
HTML: View -> Tool Window -> Terminal, in the terminal, make sure you are in the root folder of your project. Then execute gradlew.bat html:superDev (Windows) or ./gradlew html:superDev (Linux, Mac OS X). This will take a while, as your Java code is compiled to Javascript.
Once you see the message The code server is ready, fire up your browser and go to http://localhost:8080/html. This is your app running in the browser! When you change any of your Java code or assets, just click the SuperDev refresh button while you are on the site and the server will recompile your code and reload the page! To kill the process, simply press CTRL + C in the terminal window.
Once this bug in the Gradle tooling API is fixed, we can simplify running the HTML5 by using the Gradle integration. At the moment, the Gradle process will run forever even if canceled.
Also just a heads up, after you have run the gradle command it might say something like this:
The code server is ready.
Next, visit: http://localhost:9876/
Building 91% > :html:superDev
Even though it says 91%, don't worry it will still work, just go here to run it: http://localhost:8080/html/, NOT the url mentioned in the log.
Also to deploy you need to run ./gradlew html:dist to generate production code, you want to copy everything inside ./html/build/dist/ to your server. Running that command produces the code in that directory. https://gamedev.stackexchange.com/a/82588/54396
I was able to make GWT work with libgdx simply by:
downloading (http://www.gwtproject.org/download.html) the GWT SDK,
extracting it,
then in the project structure -> project-name-html -> dependencies,
just press the + and add the extracted GWT directory
A dialog appears and I just unticked all the samples
The "Dependencies Storage Format" needed to be "Intellij IDEA", not Eclipse for this to work for me.

Configuring Scala Debugger for Scala IDE

I'm trying to configure Scala Debuger.
I have specs2 tests:
#RunWith(classOf[JUnitRunner])
class DictionaryTest extends Specification { ...
I've downloaded preconfigured default scala-ide.
Turn on scala debugger by default like was said on the image (2nd slide). Restart eclipse.
Put breakpoint in my specs2 tests, but when start debugger still see java-like stack-traces when the code reaches the breakpoint (not like on 3rd slide).
Q: Are there some addition steps I should perform to start using/testingscala-debugger ?
Edit: why my screen is different than doc's screenshot. It seems Scala debugger was not On? At least I was hoping to see word 'Scala Display'
Unfortunately, your probably hit a known limitation. Currently, the new debugger is available for the Scala launcher, but not for the JUnit launcher. Here is the relevant ticket.
You could work around it if you configured the test runner to wait for a remote debugger connection, and then connect the scala debugger as described here