   (setq mcmd (format "%s%s" gtm-dist "/mumps"))
   (start-process "debugger" "Debug" mcmd "-r" "^KBBMDBUG"))   
 
+(defun lkm-stop-debugger ()
+  "Stops the debugger"
+  (interactive)
+  (setq debug-string "HALT\n")
+  (process-send-string "debugger" debug-string))
+
 (defun lkm-debug-routine ()
   "Begins debug at current routine"
   (interactive)

  (with-current-buffer (get-buffer-create "*MUMPS Global Examiner*")
    (goto-char (point-max))
    (insert "MUMPS Global Dump of " global "\n\n"))
  (call-process "mumps" nil "*MUMPS Global Examiner*" nil "-r" "KBBMLRKM" global)
  (display-buffer (get-buffer "*MUMPS Global Examiner*") t)
  (with-current-buffer (get-buffer-create "*MUMPS Global Examiner*")
    (goto-char (point-max))))

  (define-key
    global-map
    [menu-bar debug-menu send-input]
    '("Immediate" . lkm-immediate))

  (define-key
    global-map
    [menu-bar debug-menu step-over]
    '("Step Over" . lkm-step-over))
  
  (define-key
    global-map
    [menu-bar debug-menu step-out]
    '("Step Out" . lkm-step-out))  

  (define-key
    global-map
    [menu-bar debug-menu step-into]
    '("Step Into" . lkm-step-into))

  (define-key
    global-map
    [menu-bar debug-menu list-breakpoints]
    '("List Breakpoints" . lkm-list-breakpoints))    
  
  (define-key
    global-map
    [menu-bar debug-menu clear-all-breakpoints]
    '("Clear All Breakpoints" . lkm-clear-all-breakpoints))    

  (define-key
