Index: AppSrc/VdfSplat.src
===================================================================
--- AppSrc/VdfSplat.src	(revision 63)
+++ AppSrc/VdfSplat.src	(revision 64)
@@ -163,19 +163,52 @@
       End
     End_Procedure // doOpenFile
     
+    Procedure DoInitializeParameters
+      Set piDebugfileVersion To 0
+      //Set phoDebugger        To 0
+      Set psApplication Of ghoApplication To ""
+    End_Procedure
+    
+    //
+    // Locates the debug file for the application binary passed.
+    // Returns TRUE if found and sets property piDebugFileVersion
+    //
+    Function ParseApplicationDebugFile String sApplication Returns Boolean
+      Boolean bExists
+      Integer iRuntime
+      String  sExt
+      String  sDebugfile
+
+      Get ParseFileExtension sApplication To sExt
+      Move (Replace("."+sExt,sApplication,".dbg")) To sDebugfile
+      Get vFilePathExists sDebugfile to bExists
+      If (bExists=false) Begin
+        Send Warning_Box ("Sorry but for the executable chosing the corresponding debug file\n"+;
+               sDebugfile+"\ncould not be located.\n\nPlease select again.") ;
+               "VdfSplat can't do that"
+      End
+      Else Begin
+        Get ReadRuntimeVersion sDebugfile To iRuntime
+        If (iRuntime=0) Begin
+          Move False To bExists
+        End
+        Else Begin
+          Set piDebugfileVersion To iRuntime
+        End
+      End
+        
+      Function_Return bExists
+    End_Function
+    
     Procedure doDebugRun
       String  sApplication
-      String  sExt
-      String  sDebugfile
-      Integer iRuntime
       Boolean bOpen
       Boolean bExists
+      Boolean bRestartMode
       Handle  hoDebug
       Handle  hoParent
       Handle  hoDialog
       
-      Set piDebugfileVersion To 0
-
       Get psApplication of ghoApplication To sApplication
       If (sApplication = "") Begin
         Move (oOpenProgramDialog(Self)) To hoDialog
@@ -193,28 +226,21 @@
         // Oh still no app? Use our hardcoded path
         Procedure_Return
       End
-      Get ParseFileExtension sApplication To sExt
-      Move (Replace("."+sExt,sApplication,".dbg")) To sDebugfile
-      Get vFilePathExists sDebugfile to bExists
-      If (bExists=false) Begin
-        Send Warning_Box ("Sorry but for the executable chosing the corresponding debug file\n"+;
-               sDebugfile+"\ncould not be located.\n\nPlease select again.") ;
-               "VdfSplat can't do that"
-      End
-      Else Begin
-        Get ReadRuntimeVersion sDebugfile To iRuntime
-        If (iRuntime=0) Begin
-          Move False To bExists
+      Get ParseApplicationDebugFile sApplication To bExists
+        
+      Get phoDebugger to hoDebug
+      If (hoDebug) Begin
+        Get pbDebugRestart of hoDebug to bRestartMode
+        If (bRestartMode) Begin
+          Send Destroy of hoDebug
+          Move 0 To hoDebug 
         End
       End
-        
-      Get phoDebugger to hoDebug
       If (bExists and hoDebug=0) Begin
         //
 
         Get phoDebuggerHost To hoParent
-        Set piDebugfileVersion To iRuntime
-        Get Create Of hoParent U_cDebuggerEngine To hoDebug
+        Get Create Of hoParent (RefClass(cDebuggerEngine)) To hoDebug
         If (hoDebug) Begin
           Send DoCreateEngine of hoDebug
         End
@@ -251,16 +277,38 @@
     End_Procedure
     
     Procedure doStopDebug
-      Handle hoDebug
+      Boolean bPaused
+      Boolean bBreakMode
+      Handle  hoDebug
       
       Get phoDebugger to hoDebug
       If (hoDebug) Begin
+        Get pbLimitedBreakMode of hoDebug to bBreakMode
+        Get HasProgramPaused To bPaused
+        If (bPaused) Begin
+          //Send doDebugContinue
+        End
         Send ComStopProgram of hoDebug
         Send ComUpdateViews Of hoDebug
-        Set psApplication of ghoApplication To ""
+        If (bBreakMode=False) Begin
+          // You cannot destroy the debugger on here as the messageloop has to run to get the debuggee back to run
+          // so killing it here would be out of sync with what you want.
+          //Send Destroy of hoDebug
+          Send DoInitializeParameters
+        End  
       End
     End_Procedure // doStopDebug
     
+    Procedure DoRestartDebug
+      String  sApplication
+      
+      Get psApplication of ghoApplication To sApplication
+      Set pbDebugRestart of (phoDebugger(Self)) to True
+      Send DoStopDebug
+      //Sleep 1
+      Set psApplication of ghoApplication To sApplication
+    End_Procedure
+    
     Procedure doDebugPause
       Handle hoDebug
       
@@ -390,7 +438,7 @@
     //
     // A program can only be paused after it has started
     // This is used as an indication that we can step through the source
-    //
+    // The property pbProgramPaused is set on both a breakpoint and on a Pause
     Function HasProgramPaused Returns Boolean
       Boolean bPaused
       Boolean bStarted
Index: AppSrc/cDebugCJMenuItemClasses.pkg
===================================================================
--- AppSrc/cDebugCJMenuItemClasses.pkg	(revision 63)
+++ AppSrc/cDebugCJMenuItemClasses.pkg	(revision 64)
@@ -205,7 +205,7 @@
 { OverrideProperty=psCaption InitialValue=CS_CaptionRestartDebug}
 { OverrideProperty=psToolTip InitialValue=CS_ToolTipRestartDebug}
 { OverrideProperty=psDescription InitialValue=CS_DescRestartDebug}
-{ OverrideProperty=psImage InitialValue="run_exc.ico" }
+{ OverrideProperty=psImage InitialValue="restart_co.ico" }
 
 Class cCJRestartDebugMenuItem is a cCJDebugMenuItem
     
@@ -214,14 +214,13 @@
         Set psCaption       To CS_CaptionRestartDebug
         Set psToolTip       To CS_ToolTipRestartDebug
         Set psDescription   To CS_DescRestartDebug
-        Set psImage         To "term_restart.ico"
+        Set psImage         To "restart_co.ico"
         //Set psImageDisabled To "run_excd.ico"
         Set piShortcutKey   To xtpKey_Ctrl VK_F5
     End_Procedure
 
     Procedure OnExecute Variant vCommandBarControl
-       Send doStopDebug
-       Send doStartDebug
+       Send doRestartDebug
     End_Procedure
     
     Function IsEnabled Returns Boolean
@@ -450,7 +449,7 @@
 { OverrideProperty=psCaption InitialValue=CS_CaptionRemoveBreakpoint}
 { OverrideProperty=psToolTip InitialValue=CS_ToolTipRemoveBreakpoint}
 { OverrideProperty=psDescription InitialValue=CS_DescRemoveBreakpoint }
-{ OverrideProperty=psImage InitialValue="brkp_obj.ico" }
+{ OverrideProperty=psImage InitialValue="skip_brkp.ico" }
 Class cCJRemoveBreakpointMenuItem is a cCJDebugMenuItem
     
     Procedure Construct_Object
Index: AppSrc/cDebuggerEngine.pkg
===================================================================
--- AppSrc/cDebuggerEngine.pkg	(revision 63)
+++ AppSrc/cDebuggerEngine.pkg	(revision 64)
@@ -119,8 +119,8 @@
     Forward Get Msg_Entering To Rval  // Do Normal Entering
     // if entering is ok and single item check shadow state of that item.
     If (Rval=0) Begin
-      Get Item_Count To iCount
-      Get Current_Item To iItem
+//      Get Item_Count To iCount
+//      Get Current_Item To iItem
 //      Showln ("entering stack "+trim(iCount)*"current"*trim(iItem))
       //  Get Shadow_State Item 0 To Rval
     End
@@ -279,8 +279,11 @@
     Property Boolean        pbEngineActive        False
     Property Boolean pbProgramStarted      False
     Property Boolean pbProgramPaused       False
+    Property Boolean pbLimitedBreakMode    False
+    Property Boolean pbDebugRestart        False
     Property String[]       pAllMessages
     Property String[]       pAllProperties
+    Property String[]       pLanguageKeywords
     Property tBreakPoints[] pBreakPoints
     
     Set Name To "oDebuggerEngine"
@@ -367,6 +370,28 @@
     Set pAllProperties to AllProperties
   End_Procedure
   
+  Function IsLanguageKeyword String sKeyword Returns Boolean
+    Boolean  bIsKeyword
+    Integer  iCount
+    Integer  iKeyword
+    String[] Keywords
+    
+    Move false to bIsKeyword
+    Move (lowercase(sKeyWord)) To sKeyword
+    If (sKeyword<>"") Begin
+      Get pLanguageKeywords To Keywords
+      Move (SizeOfArray(Keywords)) To iCount
+      Decrement iCount
+      For iKeyWord From 0 To iCount
+        If (Keywords[iKeyword]=sKeyword) Begin
+          Move True To bIsKeyword
+          Move iCount To iKeyword // stop
+        End
+      Loop
+    End
+    Function_Return bIsKeyword
+  End_Function
+  
   Function IsVariableProperty String sVariable Returns Boolean
     Integer  iCount
     Integer  iProp
@@ -753,22 +778,28 @@
   // Occurs after the program exits
   Procedure OnComProgramExit
     Boolean  bStartedFromCLI
-    String[] AllMessages
-    String[] AllProperties
+    Boolean  bRestartMode
+    String[] Empty
     Set pbProgramStarted To False
     Set pbProgramPaused  To False
     Send SaveBreakPointsToDisk
     Set ApplicationFileName To ""
-    Move (ResizeArray(Allmessages,0))   To AllMessages
-    Move (ResizeArray(AllProperties,0)) To AllProperties
-    Set pAllMessages   to AllMessages
-    Set pAllProperties to AllProperties
-    Get pbStartedFromCLI of ghoApplication To bStartedFromCLI
-    If (bStartedFromCli) Begin
-      // debug session was started from the command line.
-      // Stopping the debug session normally should stop the debugger as well.
-      Send Exit_Application
+    Move (ResizeArray(Empty,0))   To Empty
+    Set pAllMessages      To Empty
+    Set pAllProperties    To Empty
+    Set pLanguageKeywords To Empty
+    Get pbDebugRestart to bRestartMode
+    If (bRestartMode) Begin
+      Send DoDebugRun
     End
+    Else Begin
+      Get pbStartedFromCLI of ghoApplication To bStartedFromCLI
+      If (bStartedFromCli) Begin
+        // debug session was started from the command line.
+        // Stopping the debug session normally should stop the debugger as well.
+        Send Exit_Application
+      End
+    End
   End_Procedure
 
   // Occurs if there is an error starting the program
@@ -816,7 +847,7 @@
         Send SetDebuggerAsForegroundApp
       End
       Send doOpenSourceFileAtLine of hoEditor llfile llline
-      Send doActivateCallStack  // only displays if exists or not.
+      Send doActivateDebugPanels  // only displays if exists or not.
     End
   End_Procedure
   
@@ -823,13 +854,15 @@
   //
   // Occurs when the program execution is paused
   Procedure OnComProgramPaused String llfile UInteger llline Boolean lllimitedBreakMode
-    Set pbProgramPaused  To True
+    Set pbProgramPaused    To True
+    Set pbLimitedBreakMode To lllimitedBreakMode
     Send OnProgramPaused llfile llline lllimitedBreakMode
   End_Procedure
 
   // Occurs when the program execution resumes
   Procedure OnComProgramContinue
-    Set pbProgramPaused  To False
+    Set pbProgramPaused    To False
+    Set pbLimitedBreakMode To False
   End_Procedure
 
   // Occurs after a change requiring views to be refreshed
@@ -871,6 +904,29 @@
     //Send Info_box lldescription "WebApp FATAL Error"
     Showln lleventid lltext
   End_Procedure
+  
+  Procedure AddKeyword String sWord
+    Integer  iCount
+    String[] Keywords
+    
+    Get pLanguageKeywords To Keywords
+    Move (SizeOfArray(Keywords)) To iCount
+    Move (Lowercase(sWord)) To Keywords[iCount]
+    Set pLanguageKeywords To Keywords
+  End_Procedure
+  
+  // Language keywords are not evaluated in the tooltip
+  Procedure AddLanguageKeywords
+    Send AddKeyword "End_Function"
+    Send AddKeyword "End_Procedure"
+    Send AddKeyword "Function"
+    Send AddKeyword "Move"
+    Send AddKeyword "Procedure"
+    Send AddKeyword "Send"
+    Send AddKeyword "Showln"
+    Send AddKeyword "To"
+    Send AddKeyword "UChar[]"
+  End_Procedure
 
   
   Procedure doCreateCallStack
@@ -965,7 +1021,6 @@
       If (hoVariables) Begin
         Set phoLocalVariables  To hoVariables
         Set Name               Of hoVariables To "oLocalVariables"
-        Send CreateObjectCallback of hoParent hoVariables
         
         Send CreateComObject   Of hoVariables
         Get IsComObjectCreated Of hoVariables To bCreated
@@ -972,6 +1027,7 @@
         If (bCreated) Begin
           Set ComWindowType Of hoVariables To 0 // locals
         End
+        Send CreateObjectCallback of hoParent hoVariables
       End
     End
   End_Procedure // doCreateLocalVariables
@@ -996,9 +1052,11 @@
   End_Procedure // doCreateTables
 
 
-  
-  Procedure doActivateCallStack
+  // we MUST send activate to the debug panels to make them display.
+  Procedure doActivateDebugPanels
     Handle  hoCallStack
+    Handle  hoLocalVars
+    Handle  hoGlobalVars
     Boolean bCreated
 
     Get phoCallStack To hoCallStack
@@ -1005,12 +1063,28 @@
     If (hoCallStack) Begin
       Get IsComObjectCreated Of hoCallStack To bCreated
       If (bCreated) Begin
-        Send Activate of hoCallStack  // we MUST send activate to the callstack to make it display itself
+        Send Activate of hoCallStack
       End
     End
-  End_Procedure // doActivateCallStack
 
+    Get phoLocalVariables To hoLocalVars
+    If (hoLocalVars) Begin
+      Get IsComObjectCreated Of hoLocalVars To bCreated
+      If (bCreated) Begin
+        Send Activate of hoLocalVars
+      End
+    End
 
+    Get phoGlobalVariables To hoGlobalVars
+    If (hoGlobalVars) Begin
+      Get IsComObjectCreated Of hoGlobalVars To bCreated
+      If (bCreated) Begin
+        Send Activate of hoGlobalVars
+      End
+    End
+  End_Procedure
+
+
   
   Procedure DoCreateEngine
     Boolean bCreated
@@ -1037,6 +1111,8 @@
     Send doCreateLocalVariables
     
     Send doCreateTablesWindow
+    
+    Send AddLanguageKeywords
   End_Procedure // DoCreateEngine
 
   
Index: AppSrc/cSplatCodeMax.pkg
===================================================================
--- AppSrc/cSplatCodeMax.pkg	(revision 63)
+++ AppSrc/cSplatCodeMax.pkg	(revision 64)
@@ -47,9 +47,9 @@
     Integer iVoid
   
     Get AddImage "brkp_obj.ico"     To iVoid // bit 1 // seems the first image is ignored as a margin image
-    Get AddImage "inst_ptr.ico"     To iVoid // bit 2
+    Get AddImage "inst_ptr_top.ico" To iVoid // bit 2
     Get AddImage "brkp_obj.ico"     To iVoid // bit 3
-    Get AddImage "inst_ptr_top.ico" To iVoid // bit 4
+    Get AddImage "inst_ptr.ico"     To iVoid // bit 4
   End_Procedure
 End_Class
 
@@ -426,6 +426,8 @@
     Boolean bIsProperty
     Boolean bIsProcedure
     Boolean bIsObject
+    Boolean bIsKeyword
+    Boolean bPaused
     Boolean bOK
     
     // Does not always return what we need
@@ -438,44 +440,56 @@
         Move ""    To sResult
         Move ""    To sType
         Move False To bIsObject
-        Get IsVariableProperty of hoDebugger sWord To bIsProperty
-        If (bIsProperty) Begin
-          Get ObjectForProperty sWord llLine llColumn to sTargetObject
-          Move (sWord+"("+sTargetObject+")") To sWord
-          Move "Property " To sType
-        End
-        Else Begin
-          Get IsVariableProcedure Of hoDebugger sWord To bIsProcedure
-          If (bIsProcedure) Begin
-            Move "Procedure " To sType
-          End
-          Else Begin
-            If (lowercase(sWord)="self") Begin
-              Move "Object " To sType
-              Move True     To bIsObject
+        Get pbProgramPaused    Of hoDebugger To bPaused
+        If (bPaused) Begin
+          Get IsLanguageKeyword of hoDebugger sWord To bIsKeyword //
+          If (bIsKeyword=false) Begin
+            Get IsVariableProperty of hoDebugger sWord To bIsProperty
+            If (bIsProperty) Begin
+              Get ObjectForProperty sWord llLine llColumn to sTargetObject
+              Move (sWord+"("+sTargetObject+")") To sWord
+              Move "Property " To sType
             End
-          End
-        End
-        Move ("Evaluating "+sType+"'"+sWord+"' results in"+character(10)) To llTipText
-        If (bIsProcedure) Begin
-          Move "Not evaluating methods." To sResult
-        End
-        Else Begin
-          Get ComEval of hoDebugger sWord (&sResult) to bOK
-        End
-        If (bOK) Begin
-          If (bIsObject) Begin
-            Move sResult To sObjectID
-            Move ""      To sObjectName
-            Get ComEval of hoDebugger ("name("+sObjectID+")") (&sObjectName) to bOK
+            Else Begin
+              Get IsVariableProcedure Of hoDebugger sWord To bIsProcedure
+              If (bIsProcedure) Begin
+                Move "Procedure " To sType
+              End
+              Else Begin
+                If (lowercase(sWord)="self") Begin
+                  Move "Object " To sType
+                  Move True     To bIsObject
+                End
+              End
+            End
+            Move ("Evaluating "+sType+"'"+sWord+"' results in"+character(10)) To llTipText
+            If (bIsProcedure) Begin
+              Move "Not evaluating methods." To sResult
+            End
+            Else Begin
+              Get ComEval of hoDebugger sWord (&sResult) to bOK
+            End
             If (bOK) Begin
-              Move (sResult+" ("+sObjectName+") ") To sResult
+              If (bIsObject) Begin
+                Move sResult To sObjectID
+                Move ""      To sObjectName
+                Get ComEval of hoDebugger ("name("+sObjectID+")") (&sObjectName) to bOK
+                If (bOK) Begin
+                  Move (sResult+" ("+sObjectName+") ") To sResult
+                End
+              End
+              Move (sResult+character(10)+character(10)+"Eval OK") To sResult
             End
+            Else Begin
+              Move (sResult+character(10)+character(10)+"Eval Failed") To sResult
+            End
           End
-          Move (sResult+character(10)+character(10)+"Eval OK") To sResult
+          Else Begin
+            Move ("Keyword "+sWord) To sResult
+          End
         End
         Else Begin
-          Move (sResult+character(10)+character(10)+"Eval Failed") To sResult
+          Move sWord To sResult
         End
         Move (sResult+", line="+trim(llLine+1)*", column="+Trim(llColumn+1)) To sResult
       End
@@ -550,27 +564,29 @@
   
   Procedure doOpenSourceFileAtLine String sFileName Integer iLine
     Integer eBkLineColor
+    Integer iTopMostLine
     Boolean bVisible
     Boolean bScrollup
     
     Move false to bScrollup
     Send doOpenSourceFile sFileName
-    Set piCurrentLine To iLine
-    If (iLine>10) Begin
-      Move (iLine-4) To iLine // scroll up a bit so we can see context
+    Set piCurrentLine to iLine
+    Move iLine to iTopMostLine
+    If (iLine>5) Begin
+      Move (iLine-4) to iTopMostLine // scroll up a bit so we can see context
       Move true to bScrollup
     End
-    Send ComSetTopIndex 0 iLine
-    If (bScrollup) Move (iLine+3) to iLine
+    Send ComSetTopIndex 0 iTopMostLine
+    If (iLine>=0) Begin
+        Send ComSetMarginImages (iLine-1) ICO_Inst_ptr //ICO_Brkp_obj// 2
+        //Set psFilename     of oCodeMax To sFileName
+        // Make it visible to the user where we are
+        //Move True to bVisible
+        //Send ComSelectLine of oCodeMax iLine bVisible
+        Move (RGB(223,253,193)) to eBkLineColor
+        Send ComSetLineColor (iLine-1) eBkLineColor //clYellow
+    End
     
-    Send ComSetMarginImages iLine ICO_Inst_ptr //ICO_Brkp_obj// 2
-    //Set psFilename     of oCodeMax To sFileName
-    // Make it visible to the user where we are
-    //Move True to bVisible
-    //Send ComSelectLine of oCodeMax iLine bVisible
-    Move (RGB(223,253,193)) To eBkLineColor
-    Send ComSetLineColor iLine eBkLineColor //clYellow
-    
     Send UpdateStatusHelp
     
 //    Send ComSetLineColor iLine clRed
Index: AppSrc/vdfdbg.vw
===================================================================
--- AppSrc/vdfdbg.vw	(revision 63)
+++ AppSrc/vdfdbg.vw	(revision 64)
@@ -141,56 +141,353 @@
 Object oVdfdbg is a dbView
 
     Set Border_Style to Border_Thick
-    Set Size to 346 469
+    Set Size to 346 769
     Set Location to 3 4
     Set Maximize_Icon to True
     
     Set phoDebuggerHost To Self
-    Object oDebugSplitterContainer is a cSplitterContainer
-      Set pbSplitVertical to False
-      Set piSplitterLocation to 200
-      Object oEditorSplitter is a cSplitterContainerChild
-        Object oCodeMax is a cSplatCodeMax
-          Set Size to 188 459
-          Set Location to 6 6
-          Set peAnchors to anAll
+    Object oVerticalSplitterContainer is a cSplitterContainer
+      Set pbSplitVertical to True
+      Set piSplitterLocation to 559
+      Object oLeftPanelSplitter is a cSplitterContainerChild
+        Object oDebugSplitterContainer is a cSplitterContainer
+          Set pbSplitVertical to False
+          Set piSplitterLocation to 200
+          Object oTopPanelSplitter is a cSplitterContainerChild
+            Object oCodeMax is a cSplatCodeMax
+              Set Size to 188 553
+              Set Location to 6 6
+              Set peAnchors to anAll
+              
+              Set phoEditor To Self
+            
+                Procedure OnCreate
+                  Variant vImageList
+                  Boolean bCreated
+                  Handle  hoLanguage
+                  
+                  Forward Send OnCreate
+                  
+                  // ToDo: Set the ActiveX properties here...
+                  Get ComImageList  To vImageList
+                  //Set ComHImageList 0  // OLE_HANDLE value
+                  
+                End_Procedure
+        
+              Embed_ActiveX_Resource
+              6AMAAAgAAgAAAAAACAACAAAAAAAAAQEBAAAAAQEBAQAAAQAAAAAAAAAAAAAAAAHpAwAAAQEBAAEBAAEEAP//////////////////////////////////////////QwBv
+              AHUAcgBpAGUAcgAgAE4AZQB3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAA/////wAAAAAAAAABAAAACgAAAAEAAf//////
+              ////AAAAAAABAAAAAQAAAE0uAAB2FwAA.
+              End_Embed_ActiveX_Resource
+            
+            End_Object
+          End_Object
+          Object oBottomPanelSplitter Is a cSplitterContainerChild
+            Object oDebug_TD is a TabDialog
+              Set Size to 135 553
+              Set Location to 4 6
+              Set peAnchors to anAll
           
-          Set phoEditor To Self
-        
-            Procedure OnCreate
-              Variant vImageList
-              Boolean bCreated
-              Handle  hoLanguage
+              Object oGlobalVariables_TP is a TabPage
+                Set Label to "Global Variables"
+                
+                Object oGlobalVarContainer is a Container3d
+                  Set Size to 131 540
+                  Set Location to 2 2
+                  Set peAnchors to anAll
+                  Set Border_Style to Border_StaticEdge
+                  Set phoGlobalVarHost To Self
+            
+                  
+                  Procedure CreateObjectCallback Handle hoObject
+                    Handle hoGlobalVar
+                    
+                    If (hoObject) Begin
+                      Get phoGlobalVariables To hoGlobalVar
+                      If (hoObject=hoGlobalVar) Begin
+                        Set Size                     Of hoGlobalVar To 118 359
+                        Set Location                 Of hoGlobalVar To 8 8
+                        Set peAnchors                Of hoGlobalVar To anAll
+                      End
+                    End
+                  End_Procedure // CreateObjectCallback
+                End_Object
+              End_Object
+          
+              Object oWatches_TP is a TabPage
+                Set Label to "Watches"
+          
+                Object oWatchesContainer is a Container3d
+                  Set Size to 131 540
+                  Set Location to 2 2
+                  Set peAnchors to anAll
+                  Set Border_Style to Border_StaticEdge
+                
+                  Set phoWatchesHost To Self
+                  
+                  Procedure CreateObjectCallback Handle hoObject
+                    Handle hoWatches
+                    
+                    If (hoObject) Begin
+                      Get phoWatches To hoWatches
+                      If (hoObject=hoWatches) Begin
+                        Set Size                     Of hoWatches To 118 361
+                        Set Location                 Of hoWatches To 9 6
+                        Set peAnchors                Of hoWatches To anAll
+                      End
+                    End
+                  End_Procedure // CreateObjectCallback
+                End_Object
+              End_Object
+          
+              Object oTrace_TP is a TabPage
+                Set Label to "Trace"
+                
+                Object oTraceContainer is a Container3d
+                  Set Size to 131 540
+                  Set Location to 2 2
+                  Set peAnchors to anAll
+                  Set Border_Style to Border_StaticEdge
+                  Set phoTraceHost To Self
+                  
+                  Procedure CreateObjectCallback Handle hoObject
+                    Handle hoTrace
+                    
+                    If (hoObject) Begin
+                      Get phoTrace To hoTrace
+                      If (hoObject=hoTrace) Begin
+                        Set Size                     Of hoTrace To 118 359
+                        Set Location                 Of hoTrace To 9 6
+                        Set Label                    Of hoTrace To "Trace"
+                        Set peAnchors                Of hoTrace To anAll
+                      End
+                    End
+                  End_Procedure // CreateObjectCallback
+                End_Object
+              End_Object
+          
+              //Object oDACTreelist_TP is a TabPage
+              //  Set Label to "DACTreeList (not used)"
+              //  // I do not think we are going to use this one.
+              //  Object oComCDACTreeListCtl1 is a cComCDACTreeListCtl
+              //    Set Size to 100 100
+              //    Set Location to 10 35
+              //
+              //      Procedure OnCreate
+              //          Forward Send OnCreate
+              //          // ToDo: Set the ActiveX properties here...
+              //      End_Procedure
+              //
+              //  End_Object
+              //End_Object
+          
+              Object oTables_TP is a TabPage
+                Set Label to "Tables"
+                
+                Object oTablesContainer is a Container3d
+                  Set Size to 131 540
+                  Set Location to 2 2
+                  Set peAnchors to anAll
+                  Set Border_Style to Border_StaticEdge
+                  Set phoTablesHost To Self
+            
+                  
+                  Procedure CreateObjectCallback Handle hoObject
+                    Handle hoTables
+                    
+                    If (hoObject) Begin
+                      Get phoTablesWindow To hoTables
+                      If (hoObject=hoTables) Begin
+                        Set Size                     Of hoTables To 118 363
+                        Set Location                 Of hoTables To 7 6
+                        Set peAnchors                Of hoTables To anAll
+                      End
+                    End
+                  End_Procedure // CreateObjectCallback
+                End_Object
+              End_Object
+              Object oBreakpoints_TP is a TabPage
+                Set Label to "Breakpoints"
+                Object oBreakPointsContainer is a Container3d
+                  Set Size to 131 540
+                  Set Location to 2 2
+                  Set peAnchors to anAll
+                  Set Border_Style to Border_StaticEdge
+            
+                  Object oBreakpointsGrid is a cCJGrid
+                    Set Size to 112 382
+                    Set Location to 6 10
+                    Set peAnchors to anAll
+                    Set pbReadOnly to True
+                    Set phoBreakpointsGrid To Self
               
-              Forward Send OnCreate
+                    Object oBPContextMenu Is a cBreakPointsGridContextMenu
+                    End_Object
+                    
+                    Set phoContextMenu To oBPContextMenu
+                    // Need to move to subclass for this technique, maybe later.
+                    //Function CreateContextMenu Returns Handle
+                    //  Handle hoMenu
+                    //
+                    //  Get Create (RefClass(cBreakPointsGridContextMenu)) To hoMenu
+                    //  If (hoMenu) Begin
+                    //    Set Name Of hoMenu To "oBPContextMenu"
+                    //  End
+                    //  Function_Return hoMenu
+                    //End_Function
+            
+                    Object oEnabledColumn is a cCJGridColumn
+                      Set piWidth to 57
+                      Set psCaption to "Active"
+                      Set pbCheckbox to True
+                      Set pbResizable to False
+                    End_Object
+            
+                    Object oLineColumn is a cCJGridColumn
+                      Set piWidth to 85
+                      Set psCaption to "Line"
+                      Set peDataType to Mask_Numeric_Window
+                      Set pbResizable to False
+                    End_Object
+            
+                    Object oFileNameColumn is a cCJGridColumn
+                      Set piWidth to 351
+                      Set psCaption to "File"
+                    End_Object
+                    
+                    //
+                    // Procedure ComSetCaretPos Integer llLine Integer llCol
+                    //
+                    // Procedure ComSelectLine Integer llLine Boolean llMakeVisible
+                    
+                    Procedure LoadData
+                      Handle  hoDataSource
+                      Handle  hoDebug
+                      Boolean bFound
+                      Boolean bIsCreated
+                      Integer iBreak
+                      Integer iCount
+                      Integer iRows
+                      Integer iActive
+                      Integer iLine
+                      Integer iFile
+                      tDataSourceRow[] TheData
+                      tBreakPoints[] BP
+                      
+                      Get phoDataSource to hoDataSource
+                      Get phoDebugger   to hoDebug
+                      
+                      // Get the datasource indexes of the various columns
+                      Get piColumnId of oEnabledColumn  to iActive
+                      Get piColumnId of oLineColumn     to iLine
+                      Get piColumnId of oFileNameColumn to iFile
               
-              // ToDo: Set the ActiveX properties here...
-              Get ComImageList  To vImageList
-              //Set ComHImageList 0  // OLE_HANDLE value
+                      // Load all data into the datasource array
+                      If (hoDebug) Begin
+                        Get pBreakPoints of hoDebug To BP
+                      End
+                      Move (SizeOfArray(BP)) To iCount
+                      For iBreak from 0 To (iCount-1)
+                        // BP[iBreak].bHasCondition
+                        // BP[iBreak].sExpression
+                        
+                        //If (BP[iBreak].bEnabled) Move "Y" To TheData[iRows].sValue[iActive]
+                        //Else Move "N" To TheData[iRows].sValue[iActive]
+                        Move BP[iBreak].bEnabled  To TheData[iRows].sValue[iActive]
+                        Move BP[iBreak].iLine     To TheData[iRows].sValue[iLine]
+                        Move BP[iBreak].sFileName To TheData[iRows].sValue[iFile]
+                        Increment iRows
+                      Loop
+                      
+                      Get IsComObjectCreated To bIsCreated
+                      If (bIsCreated) Begin
+                        // Initialize Grid with new data
+                        Send InitializeData TheData
+                        Send MovetoFirstRow
+                      End
+                    End_Procedure
+                    
+                  End_Object
+      
+                  Object oButton3 is a Button
+                    Set Size to 14 61
+                    Set Location to 57 410
+                    Set Label to "add breakpoint"
+                    Set peAnchors to anTopRight
+                    
+                    Procedure OnClick
+                      Integer iLine
+                      String  sFileName
+                      Boolean bSuccess
+                      Handle  hoDebugger
+                      Handle  hoEditor
+                      
+                      Get phoDebugger to hoDebugger
+                      Get phoEditor   to hoEditor
+                      If (hoDebugger<>0 and hoEditor<>0) Begin
+                        
+                        Get psFileName    of hoEditor to sFileName
+                        Get piCurrentLine of hoEditor to iLine
+                        If (sFileName<>"" and iLine<>0) Begin
+                          Get SetBreakPoint of hoDebugger sFileName (&iLine) to bSuccess
+                          Send info_box ("Set breakpoint at line"*trim(iLine)*"success="*trim(bSuccess))
+                          //Send ComSetMarginImages iLine 1
+                        End
+                      End
+              // in codemax
+              //    // turns on/off margin images for a specific line
+              //    Procedure ComSetMarginImages Integer llLine UChar llImages
+              //
+              //    // sets the line margin images
+              //    Procedure Set ComHImageList OLE_HANDLE value
+              //
+              //    // sets the line margin images
+              //    Function ComHImageList Returns OLE_HANDLE
+              //    // Returns the first line number with the specified margin images
+              //    Function ComFindLineMatchingMarginImages Integer llStartLine UChar llImages Returns Integer
+              // in debugger
+              //    // Sets the specified breakpoint
+              //    Function ComSetBreakPoint String llfile UInteger ByRef llline Returns Boolean
+                    End_Procedure
+                    
+                  End_Object
+                End_Object
+                
+                Procedure DisplayTabDetails
+                  Send LoadData of oBreakpointsGrid
+                End_Procedure
+              End_Object // TP
+          
               
-            End_Procedure
-    
-          Embed_ActiveX_Resource
-          6AMAAAgAAgAAAAAACAACAAAAAAAAAQEBAAAAAQEBAQAAAQAAAAAAAAAAAAAAAAHpAwAAAQEBAAEBAAEEAP//////////////////////////////////////////QwBv
-          AHUAcgBpAGUAcgAgAE4AZQB3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAA/////wAAAAAAAAABAAAACgAAAAEAAf//////
-          ////AAAAAAABAAAAAQAAAE0uAAB2FwAA.
-          End_Embed_ActiveX_Resource
-        
-        End_Object
-        
-        
+              Function Tab_Change Integer iToTab Integer ePointerMode Returns Integer
+                Handle  hoToTab
+                Integer iCurrentTab
+                Integer iRetVal
+                
+                Get Current_Tab To iCurrentTab
+                Forward Get Tab_Change iToTab ePointerMode To iRetVal
+                If (iCurrentTab<>-1 and iRetval=0) Begin
+                  Get Tab_Page_Id iToTab To hoToTab
+                  If (hoToTab=oBreakPoints_TP) Begin
+                    Send DisplayTabDetails of hoToTab
+                  End
+                End
+                Function_Return iRetVal
+              End_Function
+              
+            End_Object  // oDebug_TD
+          
+          End_Object // oDebugPanelSplitter
+        End_Object // oSplitterContainer
       End_Object
-      Object oDebugPanelsSplitter is a cSplitterContainerChild
-        Object oDebug_TD is a TabDialog
-          Set Size to 135 381
-          Set Location to 4 6
-          Set peAnchors to anAll
-      
-          Object oCallStack_TP is a TabPage
-            Set Label to "Call Stack"
-            
+      Object oRightPanelSplitter Is a cSplitterContainerChild
+        Object oStackSplitterContainer is a cSplitterContainer
+          Set pbSplitVertical to False
+          Set piSplitterLocation to 140
+          Object oStackTopPanelSplitter is a cSplitterContainerChild
+          
             Object oCallStackContainer is a Container3d
-              Set Size to 131 377
+              Set Size to 131 370
               Set Location to 2 2
               Set peAnchors to anAll
               Set Border_Style to Border_StaticEdge
@@ -204,7 +501,7 @@
                   Get phoCallStack To hoCallStack
                   If (hoObject=hoCallStack) Begin
                     Set Size                     Of hoCallStack To 118 361
-                    Set Location                 Of hoCallStack To 9 5
+                    Set Location                 Of hoCallStack To 11 5
                     Set Label_Justification_Mode Of hoCallStack To JMode_Top
                     Set Label_Col_Offset         Of hoCallStack To 0
                     Set Label                    Of hoCallStack To "Call Stack"
@@ -219,8 +516,8 @@
                 If (hoObject) Begin
                   Get phoCallStack To hoCallStack
                   If (hoObject=hoCallStack) Begin
-                    Set ComObjectColumnWidth     Of hoCallStack To 200
-                    Set ComMessageColumnWidth    Of hoCallStack To 400
+                    Set ComObjectColumnWidth     Of hoCallStack To 90
+                    Set ComMessageColumnWidth    Of hoCallStack To 265
                   End
                 End
               End_Procedure
@@ -231,113 +528,16 @@
               //  If hWindow Move (InvalidateRect(hWindow,0,True)) To hVoid
               //End_Procedure // RepaintTabPage
             End_Object
-            
           End_Object
-      
-          Object oWatches_TP is a TabPage
-            Set Label to "Watches"
-      
-            Object oWatchesContainer is a Container3d
-              Set Size to 131 377
-              Set Location to 2 2
-              Set peAnchors to anAll
-              Set Border_Style to Border_StaticEdge
+          Object oStackBottomPanelSplitter Is a cSplitterContainerChild
             
-              Set phoWatchesHost To Self
-              
-              Procedure CreateObjectCallback Handle hoObject
-                Handle hoWatches
-                
-                If (hoObject) Begin
-                  Get phoWatches To hoWatches
-                  If (hoObject=hoWatches) Begin
-                    Set Size                     Of hoWatches To 118 361
-                    Set Location                 Of hoWatches To 9 6
-                    Set peAnchors                Of hoWatches To anAll
-                  End
-                End
-              End_Procedure // CreateObjectCallback
-            End_Object
-          End_Object
-      
-          Object oTrace_TP is a TabPage
-            Set Label to "Trace"
-            
-            Object oTraceContainer is a Container3d
-              Set Size to 131 377
+            Object oLocalVarContainer is a Container3d
+              Set Size to 200 370
               Set Location to 2 2
               Set peAnchors to anAll
-              Set Border_Style to Border_StaticEdge
-              Set phoTraceHost To Self
+              Set Border_Style To Border_StaticEdge
               
-              Procedure CreateObjectCallback Handle hoObject
-                Handle hoTrace
-                
-                If (hoObject) Begin
-                  Get phoTrace To hoTrace
-                  If (hoObject=hoTrace) Begin
-                    Set Size                     Of hoTrace To 118 359
-                    Set Location                 Of hoTrace To 9 6
-                    Set Label                    Of hoTrace To "Trace"
-                    Set peAnchors                Of hoTrace To anAll
-                  End
-                End
-              End_Procedure // CreateObjectCallback
-            End_Object
-          End_Object
-      
-          //Object oDACTreelist_TP is a TabPage
-          //  Set Label to "DACTreeList (not used)"
-          //  // I do not think we are going to use this one.
-          //  Object oComCDACTreeListCtl1 is a cComCDACTreeListCtl
-          //    Set Size to 100 100
-          //    Set Location to 10 35
-          //
-          //      Procedure OnCreate
-          //          Forward Send OnCreate
-          //          // ToDo: Set the ActiveX properties here...
-          //      End_Procedure
-          //
-          //  End_Object
-          //End_Object
-      
-          Object oGlobalVariables_TP is a TabPage
-            Set Label to "Global Variables"
-            
-            Object oGlobalVarContainer is a Container3d
-              Set Size to 131 377
-              Set Location to 2 2
-              Set peAnchors to anAll
-              Set Border_Style to Border_StaticEdge
-              Set phoGlobalVarHost To Self
-        
-              
-              Procedure CreateObjectCallback Handle hoObject
-                Handle hoGlobalVar
-                
-                If (hoObject) Begin
-                  Get phoGlobalVariables To hoGlobalVar
-                  If (hoObject=hoGlobalVar) Begin
-                    Set Size                     Of hoGlobalVar To 118 359
-                    Set Location                 Of hoGlobalVar To 8 8
-                    Set peAnchors                Of hoGlobalVar To anAll
-                  End
-                End
-              End_Procedure // CreateObjectCallback
-            End_Object
-          End_Object
-      
-          Object oLocalVariables_TP is a TabPage
-            Set Label to "Local Variables"
-      
-            
-            Object oLocalVarContainer is a Container3d
-              Set Size to 131 377
-              Set Location to 2 2
-              Set peAnchors to anAll
-              Set Border_Style to Border_StaticEdge
               Set phoLocalVarHost To Self
-        
               
               Procedure CreateObjectCallback Handle hoObject
                 Handle hoLocalVar
@@ -345,8 +545,11 @@
                 If (hoObject) Begin
                   Get phoLocalVariables To hoLocalVar
                   If (hoObject=hoLocalVar) Begin
-                    Set Size                     Of hoLocalVar To 118 359
-                    Set Location                 Of hoLocalVar To 8 8
+                    Set Size                     Of hoLocalVar To 188 359
+                    Set Location                 Of hoLocalVar To 11 5
+                    Set Label_Justification_Mode Of hoLocalVar To JMode_Top
+                    Set Label_Col_Offset         Of hoLocalVar To 0
+                    Set Label                    Of hoLocalVar To "Local Variables"
                     Set peAnchors                Of hoLocalVar To anAll
                   End
                 End
@@ -353,205 +556,9 @@
               End_Procedure // CreateObjectCallback
             End_Object
           End_Object
-      
-          Object oTables_TP is a TabPage
-            Set Label to "Tables"
-            
-            Object oTablesContainer is a Container3d
-              Set Size to 131 377
-              Set Location to 2 2
-              Set peAnchors to anAll
-              Set Border_Style to Border_StaticEdge
-              Set phoTablesHost To Self
-        
-              
-              Procedure CreateObjectCallback Handle hoObject
-                Handle hoTables
-                
-                If (hoObject) Begin
-                  Get phoTablesWindow To hoTables
-                  If (hoObject=hoTables) Begin
-                    Set Size                     Of hoTables To 118 363
-                    Set Location                 Of hoTables To 7 6
-                    Set peAnchors                Of hoTables To anAll
-                  End
-                End
-              End_Procedure // CreateObjectCallback
-            End_Object
-          End_Object
-          Object oBreakpoints_TP is a TabPage
-            Set Label to "Breakpoints"
-            Object oBreakPointsContainer is a Container3d
-              Set Size to 131 377
-              Set Location to 2 2
-              Set peAnchors to anAll
-              Set Border_Style to Border_StaticEdge
-        
-              Object oBreakpointsGrid is a cCJGrid
-                Set Size to 112 282
-                Set Location to 6 10
-                Set peAnchors to anAll
-                Set pbReadOnly to True
-                Set phoBreakpointsGrid To Self
-          
-                Object oBPContextMenu Is a cBreakPointsGridContextMenu
-                End_Object
-                
-                Set phoContextMenu To oBPContextMenu
-                // Need to move to subclass for this technique, maybe later.
-                //Function CreateContextMenu Returns Handle
-                //  Handle hoMenu
-                //
-                //  Get Create (RefClass(cBreakPointsGridContextMenu)) To hoMenu
-                //  If (hoMenu) Begin
-                //    Set Name Of hoMenu To "oBPContextMenu"
-                //  End
-                //  Function_Return hoMenu
-                //End_Function
-        
-                Object oEnabledColumn is a cCJGridColumn
-                  Set piWidth to 57
-                  Set psCaption to "Active"
-                  Set pbCheckbox to True
-                  Set pbResizable to False
-                End_Object
-        
-                Object oLineColumn is a cCJGridColumn
-                  Set piWidth to 85
-                  Set psCaption to "Line"
-                  Set peDataType to Mask_Numeric_Window
-                  Set pbResizable to False
-                End_Object
-        
-                Object oFileNameColumn is a cCJGridColumn
-                  Set piWidth to 351
-                  Set psCaption to "File"
-                End_Object
-                
-                //
-                // Procedure ComSetCaretPos Integer llLine Integer llCol
-                //
-                // Procedure ComSelectLine Integer llLine Boolean llMakeVisible
-                
-                Procedure LoadData
-                  Handle  hoDataSource
-                  Handle  hoDebug
-                  Boolean bFound
-                  Boolean bIsCreated
-                  Integer iBreak
-                  Integer iCount
-                  Integer iRows
-                  Integer iActive
-                  Integer iLine
-                  Integer iFile
-                  tDataSourceRow[] TheData
-                  tBreakPoints[] BP
-                  
-                  Get phoDataSource to hoDataSource
-                  Get phoDebugger   to hoDebug
-                  
-                  // Get the datasource indexes of the various columns
-                  Get piColumnId of oEnabledColumn  to iActive
-                  Get piColumnId of oLineColumn     to iLine
-                  Get piColumnId of oFileNameColumn to iFile
-          
-                  // Load all data into the datasource array
-                  If (hoDebug) Begin
-                    Get pBreakPoints of hoDebug To BP
-                  End
-                  Move (SizeOfArray(BP)) To iCount
-                  For iBreak from 0 To (iCount-1)
-                    // BP[iBreak].bHasCondition
-                    // BP[iBreak].sExpression
-                    
-                    //If (BP[iBreak].bEnabled) Move "Y" To TheData[iRows].sValue[iActive]
-                    //Else Move "N" To TheData[iRows].sValue[iActive]
-                    Move BP[iBreak].bEnabled  To TheData[iRows].sValue[iActive]
-                    Move BP[iBreak].iLine     To TheData[iRows].sValue[iLine]
-                    Move BP[iBreak].sFileName To TheData[iRows].sValue[iFile]
-                    Increment iRows
-                  Loop
-                  
-                  Get IsComObjectCreated To bIsCreated
-                  If (bIsCreated) Begin
-                    // Initialize Grid with new data
-                    Send InitializeData TheData
-                    Send MovetoFirstRow
-                  End
-                End_Procedure
-                
-              End_Object
-  
-              Object oButton3 is a Button
-                Set Size to 14 61
-                Set Location to 57 310
-                Set Label to "add breakpoint"
-                Set peAnchors to anTopRight
-                
-                Procedure OnClick
-                  Integer iLine
-                  String  sFileName
-                  Boolean bSuccess
-                  Handle  hoDebugger
-                  Handle  hoEditor
-                  
-                  Get phoDebugger to hoDebugger
-                  Get phoEditor   to hoEditor
-                  If (hoDebugger<>0 and hoEditor<>0) Begin
-                    
-                    Get psFileName    of hoEditor to sFileName
-                    Get piCurrentLine of hoEditor to iLine
-                    If (sFileName<>"" and iLine<>0) Begin
-                      Get SetBreakPoint of hoDebugger sFileName (&iLine) to bSuccess
-                      Send info_box ("Set breakpoint at line"*trim(iLine)*"success="*trim(bSuccess))
-                      //Send ComSetMarginImages iLine 1
-                    End
-                  End
-          // in codemax
-          //    // turns on/off margin images for a specific line
-          //    Procedure ComSetMarginImages Integer llLine UChar llImages
-          //
-          //    // sets the line margin images
-          //    Procedure Set ComHImageList OLE_HANDLE value
-          //
-          //    // sets the line margin images
-          //    Function ComHImageList Returns OLE_HANDLE
-          //    // Returns the first line number with the specified margin images
-          //    Function ComFindLineMatchingMarginImages Integer llStartLine UChar llImages Returns Integer
-          // in debugger
-          //    // Sets the specified breakpoint
-          //    Function ComSetBreakPoint String llfile UInteger ByRef llline Returns Boolean
-                End_Procedure
-                
-              End_Object
-            End_Object
-            
-            Procedure DisplayTabDetails
-              Send LoadData of oBreakpointsGrid
-            End_Procedure
-          End_Object // TP
-      
-          
-          Function Tab_Change Integer iToTab Integer ePointerMode Returns Integer
-            Handle  hoToTab
-            Integer iCurrentTab
-            Integer iRetVal
-            
-            Get Current_Tab To iCurrentTab
-            Forward Get Tab_Change iToTab ePointerMode To iRetVal
-            If (iCurrentTab<>-1 and iRetval=0) Begin
-              Get Tab_Page_Id iToTab To hoToTab
-              If (hoToTab=oBreakPoints_TP) Begin
-                Send DisplayTabDetails of hoToTab
-              End
-            End
-            Function_Return iRetVal
-          End_Function
-          
-        End_Object  // oDebug_TD
-      
-      End_Object // oDebugPanelSplitter
-    End_Object // oSplitterContainer
+        End_Object
+      End_Object
+    End_Object
 
 
 
