allow standAlone apps to be mini-debugged with '-debug' flag
authorClaus Gittinger <cg@exept.de>
Tue, 07 Jan 1997 15:53:01 +0100
changeset 2075 85e8e9cfebd3
parent 2074 01f7e1396c18
child 2076 5a372831207f
allow standAlone apps to be mini-debugged with '-debug' flag
Smalltalk.st
--- a/Smalltalk.st	Tue Jan 07 15:16:03 1997 +0100
+++ b/Smalltalk.st	Tue Jan 07 15:53:01 1997 +0100
@@ -1733,9 +1733,10 @@
     "main startup, if there is a Display, initialize it
      and start dispatching; otherwise go into a read-eval-print loop."
 
-    |idx graphicalMode arg|
+    |idx graphicalMode arg debuggingStandAlone|
 
     graphicalMode := true.
+    debuggingStandAlone := false.
     Initializing := true.
 
     CommandLine := CommandLineArguments copy.
@@ -1748,6 +1749,11 @@
     StandAlone ifTrue:[
         InfoPrinting := false.
         ObjectMemory infoPrinting:false.
+	idx := CommandLineArguments indexOf:'-debug'.
+	idx ~~ 0 ifTrue:[
+	    CommandLineArguments removeAtIndex:idx.
+	    debuggingStandAlone := true
+	]
     ].
 
     "
@@ -1832,7 +1838,10 @@
     ].
 
     StandAlone ifTrue:[
-        Debugger := Inspector := nil
+        Debugger := Inspector := nil.
+	debuggingStandAlone ifTrue:[
+	    Debugger := MiniDebugger.
+	].
     ] ifFalse:[
         "
          enable the graphical debugger/inspector 
@@ -3474,5 +3483,5 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.200 1997-01-07 14:16:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.201 1997-01-07 14:53:01 cg Exp $'
 ! !