mirror of
https://github.com/enso-org/enso.git
synced 2024-09-11 13:15:52 +03:00
sbt runEngineDistribution --debug to ease debuggging (#6745)
This commit is contained in:
parent
9e491e7c0b
commit
2bc7d346a8
@ -7,6 +7,8 @@ import sbt.util.{CacheStore, CacheStoreFactory, FileInfo, Tracked}
|
||||
|
||||
import scala.sys.process._
|
||||
|
||||
import org.enso.build.WithDebugCommand
|
||||
|
||||
object DistributionPackage {
|
||||
|
||||
/** File extensions. */
|
||||
@ -263,6 +265,10 @@ object DistributionPackage {
|
||||
all.add(enso.getAbsolutePath())
|
||||
all.addAll(args.asJava)
|
||||
pb.command(all)
|
||||
if (args.contains("--debug")) {
|
||||
all.remove("--debug")
|
||||
pb.environment().put("JAVA_OPTS", WithDebugCommand.DEBUG_OPTION)
|
||||
}
|
||||
pb.inheritIO()
|
||||
val p = pb.start()
|
||||
val exitCode = p.waitFor()
|
||||
|
@ -15,6 +15,8 @@ import sbt._
|
||||
* }}}
|
||||
*/
|
||||
object WithDebugCommand {
|
||||
val DEBUG_OPTION =
|
||||
"-agentlib:jdwp=transport=dt_socket,server=n,address=localhost:5005,suspend=y";
|
||||
|
||||
val truffleNoBackgroundCompilationOptions = Seq(
|
||||
"-Dpolyglot.engine.BackgroundCompilation=false"
|
||||
@ -78,9 +80,7 @@ object WithDebugCommand {
|
||||
else Seq()
|
||||
val debuggerOpts =
|
||||
if (debugFlags.contains(debuggerOption))
|
||||
Seq(
|
||||
"-agentlib:jdwp=transport=dt_socket,server=n,address=localhost:5005,suspend=y"
|
||||
)
|
||||
Seq(DEBUG_OPTION)
|
||||
else Seq()
|
||||
val javaOpts: Seq[String] = Seq(
|
||||
truffleNoBackgroundCompilationOptions,
|
||||
|
Loading…
Reference in New Issue
Block a user