Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


[#1044] Fixed case for dev and prod modes in #339

merged 1 commit into from

4 participants


Now it shouldn't differ if you specify upper or lowercase prod or dev in application.mode


Why is it a problem? I think it is fine that it is case sensitive as long as it is consistent.

@pepite pepite closed this

No, it isn't consistent. The server starts in development mode but doesn't attach the debugger if you use uppercase. Here's the original description from the lighthouse ticket

One result of this is that when you run an application with application.mode=DEV then Play says You're running Play! in DEV mode but does not listen for Java debugger connections (no Listening for transport dt_socket at address: 8000 output).

@pepite pepite reopened this

Ok thanks

@pepite pepite merged commit 482b191 into from

maybe toupper would help here.

What if I use "Dev" ?


we should not allow Dev or dEV or any other combinations. I am already wondering if supporting dev == DEV is such a good idea.


Why does it matter? Let users write it in any upper/lower case combination but check for a real value by lowercasing (or uppercasing) it.


@jyyna: that's what I meant


and java part of Play - see - does it too, there is toUpperCase() call after fetching configuration parameter.
this pull request should make the behaviour consistent in both java and python parts - #346


Well the problem I have is that when you do something like play run --%prod you really mean prod, the profile "prod" and not "Prod" or "pRod" . And for the profile I really don't want to be case insensitive. At the same time I suppose this is not the same thing even if closely related.


I think we are trying to handle application.mode= configuration parameter not profile name here. Correct me if I am wrong, pls.


Yes we agree I think. I am just saying, because it is usually related (you have a profile for dev or prod per environment) it is better to have it match your "dev" or "prod" environment (so same case). Anyway, it has been merged and it is not a biggy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 framework/pym/play/
4 framework/pym/play/
@@ -236,7 +236,7 @@ def java_cmd(self, java_args, cp_args=None, className='play.server.Server', args
application_mode = self.readConf('application.mode')
- if application_mode == 'prod':
+ if application_mode == 'prod' or application_mode == 'PROD':
java_policy = self.readConf('java.policy')
@@ -254,7 +254,7 @@ def java_cmd(self, java_args, cp_args=None, className='play.server.Server', args
- if self.readConf('application.mode') == 'dev':
+ if self.readConf('application.mode') == 'dev' or self.readConf('application.mode') == 'DEV':
if not self.play_env["disable_check_jpda"]: self.check_jpda()
java_args.append('-Xrunjdwp:transport=dt_socket,address=%s,server=y,suspend=n' % self.jpda_port)
Something went wrong with that request. Please try again.