propagate property "isabelle.debug", notably for Java/Scala exception trace;
authorwenzelm
Wed, 21 Feb 2024 11:43:30 +0100
changeset 79681 df1059ea8846
parent 79680 0b58e85906a1
child 79682 1fa1b32b0379
propagate property "isabelle.debug", notably for Java/Scala exception trace;
src/Pure/Build/build_cluster.scala
src/Pure/System/other_isabelle.scala
--- a/src/Pure/Build/build_cluster.scala	Mon Feb 19 16:25:06 2024 +0100
+++ b/src/Pure/Build/build_cluster.scala	Wed Feb 21 11:43:30 2024 +0100
@@ -189,7 +189,9 @@
       remote_isabelle
     }
 
-    def init(): Unit = remote_isabelle.init()
+    def init(): Unit =
+      remote_isabelle.init(other_settings =
+        remote_isabelle.init_components() ::: remote_isabelle.debug_settings())
 
     def benchmark(): Unit = {
       val script =
--- a/src/Pure/System/other_isabelle.scala	Mon Feb 19 16:25:06 2024 +0100
+++ b/src/Pure/System/other_isabelle.scala	Wed Feb 21 11:43:30 2024 +0100
@@ -147,6 +147,14 @@
     else error("Cannot proceed with existing user settings file: " + etc_settings)
   }
 
+  def debug_settings(): List[String] = {
+    val debug = System.getProperty("isabelle.debug", "") == "true"
+    if (debug) {
+      List("ISABELLE_JAVA_SYSTEM_OPTIONS=\"$ISABELLE_JAVA_SYSTEM_OPTIONS -Disabelle.debug=true\"")
+    }
+    else Nil
+  }
+
 
   /* init */