score:31
First of all, you have created the configuration files for Eclipse by using the play eclipsify YourProject
command, right? (If not, see Play framework documentation for more information.)
After that, you should have a folder named eclipse
in your project. In it, you should see commands Connect JDPA to YourProject.launch
, YourProject.launch
and Test YourProject.launch
.
Right-click on the YourProject.launch
and choose Run As --> YourProject
from the pop-up menu. That will start your application. When the application is running, right-click on the Connect JDPA to YourProject.launch
, and choose Debug As --> Connect JDPA to YourProject.launch
from the pop-up menu. That will start a debug session on your application.
score:1
If you run "play eclipsify" on the project folder, it will create two run configurations. Looking at the run configuration details, you should check if the following line (or something similar) is in the "VM arguments":
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
-Dplay.debug=yes
-Dplay.id=test -Dapplication.path="${project_loc:NMKServer}"
-Djava.endorsed.dirs="c:\Java\play-1.2.2/framework/endorsed"
-javaagent:"c:\Java\play-1.2.2/framework/play-1.2.2.jar"
Here you can configure the debugging port. With this config, I can attach to process using the instructuctions you have.
score:2
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.
score:4
With activator, you'll need activator -jvm-debug <port number> ~run
score:4
I guess most of you are running the play framework with Typesafe Activator. If you are doing so, This may help you,
activator -jvm-debug ~run
Like : activator -jvm-debug 9999 ~run
(then It will start the debugger in 9999 port along with the app running in 9000 port.)
- Now go to eclipse and right click on the project name you want to debug and select Debug As -> Debug configuration.. -> (select)Remote Java Application -> new (top left an icon with tiny plus sign) -> connect specify port 9999 and debug.
score:7
Play 2.1-RC2 : Running Play! app that is synced with Eclipse
To make the project Eclipse compatible, got he project folder and then give command ">play eclipse". Now you can add it as an existing project form eclipse.
Then to run it you have to first run start play in the project folder i.e. command "play"
This will activate play server and identify the app in the project i.e. [appname]$ now you have to just give the command "run" to see your app running on the localhost:9000 or whichever port config you have specified.
Debug mode: To run this similarly you need first give command "play" then [appname]$ "play debug run" this will by default use port 9999 so when you go to localhost:9000 in your browser and in your eclipse file -> Debug As -> Debug configuration.. -> New Remote Java Application -> connect specify port 9999 and debug
score:115
As of Play 2.0, the eclipse
folder and launchers are no longer generated when you run play eclipsify
. After running play eclipsify
, you can debug your project in Eclipse as follows:
- In a console outside of eclipse, run
play debug run
. - In Eclipse, right-click your project, then choose
Debug As -> Debug Configurations...
- Right-click
Remote Java Application
, then clickNew
. - The host should already be set to
localhost
. Set the port to9999
(the default port used by theplay debug run
command). - Click
Apply
to save, thenDebug
to connect to your running Play instance.
Source: stackoverflow.com
Related Query
- Debug Playframework in Eclipse
- Debug Playframework 2.0 in Eclipse
- Eclipse Juno No Debug Toolbar?
- debug JSP from eclipse
- Maven build debug in Eclipse
- Debug JavaScript in Eclipse
- Determine if a java application is in debug mode in Eclipse
- Speeding up Tomcat in debug mode with Eclipse IDE
- Eclipse android project always lauching in debug
- How to debug Java code when using ANT script in Eclipse
- how to debug application as root in eclipse in Ubuntu?
- How to filter call stack in Eclipse debug view for Java
- Eclipse shortcut "debug last debug configuration" (not F11)
- How to debug compiled Java code in Eclipse
- Maven Eclipse Debug "JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)"
- eclipse remote debug timeout problem
- Eclipse debug view current line
- How to debug Celery/Django tasks running locally in Eclipse
- how to debug maven surefire test more easily (using eclipse as debug server)
- How to Debug JUnit tests similar to a regular Java program within Eclipse
- Understanding Eclipse debug source lookup with dynamically compiled and loaded code
- Unable to debug in Java with eclipse
- Eclipse runs debug mode even when I click "run"
- Why Eclipse doesn't show local variables values when I debug class file from JDK?
- How to Use Eclipse to Debug JNI code (Java & C/C++)
- How to configure Eclipse to skip Exceptions in debug mode?
- Eclipse not picking up Maven attached source on debug
- Stop eclipse switch to Debug tab
- How to use Eclipse interactive console in debug
- How to exit eclipse debug perspective?
More Query from same tag
- eclipse libraries no longer working
- Unable to create simple java restapi in eclipse
- annotation in eclipse for using google client api from android - @Key
- Could not locate google-play-services_lib.jar, but is there
- Log4J out to console and file produces warnings/errors log4j:WARN File option not set for appender
- org.eclipse.jetty.io.EofException at Build and deploy
- How do I implement int argc and char *argv[] in the main function?
- Open file in eclipse on mac 10.6
- Maven not running generate goal during Maven build or Maven generate-sources from within Eclipse
- eclipse include custom files (c)
- Xtext assign object in xtext file
- Eclipse Repository
- Installing Plugin to Eclipse Doesn't Work
- Maven test in Eclipse fails, but the same test in Jenkins succeded
- Can Eclipse's Content-assist be made more flexible?
- Eclipse DDMS does not show contents of sdcard
- Is there a better way to link up XML elements with java classes in Android than findViewById()
- Getting error in pom.xml. It shows connection timed out. My network proxy does not allow to connect to Maven
- Making a Grid on a JFrame and filling with random colours
- Eclipse 4 RCP - Application does not have an active window
- Eclipse Google cloud plugin for standard environment issue
- Show whitespace characters in standard output
- How to create an expandablelistview by using only listview in android
- Eclipse takes a really long time to open a project
- API to select a file in Eclipse using an external application
- Eclipse(Ubuntu) doesnt show one plus one device even if USB debugging is turned on
- Debug classes like org.apache.struts.action.RequestProcessor in Eclipse
- Eclipse JBoss Plugin has wrong PATH to JBoss Home Dir
- What is the keyboard shortcut to run all unit tests in the current project in PyDev + Eclipse?
- Update ear in web sphere from command line