We use "play.bat run" for production and "play.bat run --%dev" for development(and another for QA) but when we change the launch configuration so --%dev is in the arguments, it doesn't work and loads the production variables instead. How does one launch the debugger so it is running with our development settings?
thanks, Dean
When running your Play instance inside Eclipse, you can modify the launch configuration, in the Run menu, select "Run configurations..."
On the left are all your configurations, where you will find one named as you Play project (if you ran play eclipsify). You can select it, go into the "Arguments" tab and look for "-Dplay.id=" in the VM arguments. You can modifiy the play id used here. (ie "-Dplay.id=dev")
You can also duplicate your eclipse run configurations by right clicking on the left tree, therefore you can have one run configuration per play id.
The eclipse launcher and the eclipse debug launcher, which gets generated by the
command need not be modified to pass --%dev parameter.
Start play from the command line -
You should the below line in the command window -
Verify the port is 8000, if it is different, then you need to modify the eclipse debug launcher to this port. By default the files generated have 8000 port
Starting with the
--%dev
command will use all the properties defined with the%dev
prefix in yourapplication.conf
. If a property is not defined with%dev
then the default one (one without prefix) is used. You need to differentiate between your environment settings and play running mode.For example:
will start play in prod mode when used without framework id. if
--%dev
is used then play will start in dev mode (request are serialized, application waits for the first request to start, ...)