Play 2.6.12: play.editor setting is ignored

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!

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"
1 Like

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.

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?

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

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