I've been trying to get FSC to work with IntelliJ, with limited success.
My problem is that FSC crashes frequently. Usually just when it's running in the background doing nothing. I finally created a wrapper script to restart it immediately after a crash, but having FSC restart all the time defeats the purpose of running it in the first place.
When FSC crashes, it just exits with a non-zero error code. There's no output or log file with any messages indicating what might have gone wrong.
How can I debug what's going on here?
Here's how I'm starting FSC from my script:
java -Xmx512m -XX:MaxPermSize=512m \
-classpath $IVY_CACHE/org.scala-lang/scala-library/jars/scala-library-$SCALA_VERSION.jar:$IVY_CACHE/org.scala-lang/scala-compiler/jars/scala-compiler-$SCALA_VERSION.jar \
SCALA_VERSION is 2.8.1.
There is a 'feature' in FSC that times out and terminates the server if it is idle for 30 minutes. This is probably an attempt to conserve system resources.
Since Scala version 2.9.0 there is a parameter for fsc to configure the timeout value. Use
fsc -max-idle <minutes>
If you specify a value of 0 minutes, there is no timeout.
Found via Stack Overflow.
That option is now included in the FSC command line.
We are planning full support of fsc after Pavel's vacation around september. I hope it will be much more user-friendly and usable (possibly enabled by default).