                       (switch-to-buffer-other-window
                        straight-bug-report--process-buffer))
                     (unless ,preserve-files
+                      (debug)
                       (delete-directory ,temp-emacs-dir 'recursive))))
        (message "Testing straight.el in directory: %s"
                 ,temp-emacs-dir))))


(defun straight-bug-report--report-form (form)
  "Convert elisp FORM into formatted string."
  (let* ((last (car (last form)))
         (string (mapconcat
                  (lambda (el)
                    (format (concat (when (and el (listp el)) "\n")
                                    "%S"
                                    (unless (or (keywordp el)
                                                (eq last el)) "\n"))
                            el))
                  form " ")))
    (with-temp-buffer
      ;; Trim last newline to prevent dangling paren
      (insert "(" string ")")
      (goto-char (point-min))
      ;; Remove empty lines
      (flush-lines "\\(?:^[[:space:]]*$\\)")
      (emacs-lisp-mode)
      (indent-region (point-min) (point-max))
      (buffer-string))))

;;;###autoload
(defmacro straight-bug-report (&rest args)

                       (expand-file-name dir temporary-file-directory)
                     (make-temp-file "straight.el-test-" 'directory)))
         ;; Construct metaprogram to be evaled by subprocess
         (program (pp-to-string
                   (append '(progn)
                           `((setq user-emacs-directory ,temp-dir))
                           straight-bug-report--setup
                           (alist-get :pre-bootstrap keywords)
                           straight-bug-report--bootstrap
                           (alist-get :post-bootstrap keywords)))))
    `(let* ((,preserve-files    ,(car (alist-get :preserve keywords)))
            (,interactive       ,(car (alist-get :interactive keywords)))
            (,emacs-executable  ,(or (car (alist-get :executable keywords))
