Play 2.6.12: play.editor setting is ignored

configuration

(Nemoo) #1

Hi!

I tried to enable the displaying of a link to Intellij within the play error page.

According to the documentation this is done by adding

play.editor=“http://localhost:63342/api/file/?file=%s&line=%s

to application.conf

In my Scala play 2.6.12 application I did just that, but the error page is still displayed without a clickable link to the relevant file and position in IntelliJ. Anybody else experiencing this?

Thanks!


(Schmitt Christian) #2

Maybe this does not work in Dev Mode.

Try to set PLAY_EDITOR environment Variable or edit your build.sbt to include the following:

fork := true // required for "sbt run" to pick up javaOptions

javaOptions += "-Dplay.editor=http://localhost:63342/api/file/?file=%s&line=%s"

(Nemoo) #3

Maybe this does not work in Dev Mode.

If it doesn’t work for anybody in dev mode I will definitely raise an issue on Github.

Ok, the problem apparently does occur on one instance of Chrome and not on another instance.


(Nemoo) #4

Ok it works (it displays a clickable link that opens the file in IntelliJ) if I am using the play-framework-tools chrome extension.

The documentation would suggest that it should work without having to install a chrome extension, no?


(Nemoo) #5

I have created an issue https://github.com/playframework/playframework/issues/8330 so that this can be tracked properly.


(Rich Dougherty) #6

Here’s a way to set configuration in dev mode:

PlayKeys.devSettings := Seq("play.editor" -> "http://localhost:63342/api/file/?file=%s&line=%s")

See: https://www.playframework.com/documentation/2.6.x/ConfigFile#Extra-devSettings