                                                     (current-buffer)
                                                     'intero-flycheck-buffer)))))
                             (message "Booted up intero!"))))))
-      (set-process-filter process
-                          (lambda (process string)
-                            (when (buffer-live-p (process-buffer process))
-                              (with-current-buffer (process-buffer process)
-                                (goto-char (point-max))
-                                (insert string)
-                                (when (and intero-try-with-build
-                                           intero-starting)
-                                  (let ((last-line (buffer-substring-no-properties
-                                                    (line-beginning-position)
-                                                    (line-end-position))))
-                                    (if (string-match "^Progress" last-line)
-                                        (message "Booting up intero (building dependencies: %s)"
-                                                 (downcase
-                                                  (or (car (split-string (replace-regexp-in-string
-                                                                          "\u0008+" "\n"
-                                                                          last-line)
-                                                                         "\n" t))
-                                                      "...")))
-                                      (message "Booting up intero ..."))))
-                                (intero-read-buffer)))))
+      (set-process-filter
+       process
+       (lambda (process string)
+         (when debug-on-error
+           (message "[Intero] <- %s" string))
+         (when (buffer-live-p (process-buffer process))
+           (with-current-buffer (process-buffer process)
+             (goto-char (point-max))
+             (insert string)
+             (when (and intero-try-with-build
+                        intero-starting)
+               (let ((last-line (buffer-substring-no-properties
+                                 (line-beginning-position)
+                                 (line-end-position))))
+                 (if (string-match "^Progress" last-line)
+                     (message "Booting up intero (building dependencies: %s)"
+                              (downcase
+                               (or (car (split-string (replace-regexp-in-string
+                                                       "\u0008+" "\n"
+                                                       last-line)
+                                                      "\n" t))
+                                   "...")))
+                   (message "Booting up intero ..."))))
+             (intero-read-buffer)))))
       (set-process-sentinel process 'intero-sentinel)
       buffer)))
 

                               (list (list state
                                           (or callback #'ignore)
                                           cmd)))))
               (process-send-string (intero-process worker)
                                    (concat cmd "\n")))
      (error "Intero process is not running. Run M-x intero-restart to start it."))))

  (interactive)
  (let* ((old-options
          (list
           (list :key "load-all"
                 :title "Load all modules"
                 :default (not (buffer-local-value 'intero-repl-no-load backend-buffer)))
           (list :key "build-first"
                 :title "Build project first"
                 :default (not (buffer-local-value 'intero-repl-no-build backend-buffer)))))
         (new-options (intero-multiswitch "Start REPL with options:" old-options)))
    (with-current-buffer backend-buffer
      (setq intero-repl-no-load (not (member "load-all" new-options)))
