Function: dape-info

dape-info is an interactive and natively compiled function defined in dape.el.

Signature

(dape-info &optional MAYBE-KILL)

Documentation

Display debug info buffers showing variables, stack, etc.

If MAYBE-KILL is non-nil (which is always true when called interactively) and all info buffers are already displayed, kill each buffer info buffer. See dape-info-buffer-window-groups for how to customize which buffers get displayed and how they are grouped.

Key Bindings

ctl-x-map C-a i dape-global-map i global-map C-x C-a i help-quick-use-map C-x C-a i

Source Code

;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape-info (&optional maybe-kill)
  "Display debug info buffers showing variables, stack, etc.
If MAYBE-KILL is non-nil (which is always true when called
interactively) and all info buffers are already displayed, kill each
buffer info buffer.
See `dape-info-buffer-window-groups' for how to customize which
buffers get displayed and how they are grouped."
  (interactive (list t))
  (let (buffer-displayed-p)
    (cl-loop with displayed-buffers =
             (cl-remove-if-not #'get-buffer-window
                               (dape--info-buffer-list))
             for group in dape-info-buffer-window-groups unless
             (cl-loop for spec in group thereis
                      (cl-some (lambda (buffer)
                                 (with-current-buffer buffer
                                   (apply #'dape--info-buffer-p
                                          (ensure-list spec))))
                               displayed-buffers))
             do
             (setq buffer-displayed-p t)
             (dape--display-buffer
              (apply #'dape--info-get-buffer-create
                     (or
                      ;; Try to re-create the last window setup
                      (cl-find-if
                       (pcase-lambda (`(,hist-mode ,hist-index))
                         (cl-find-if
                          (pcase-lambda (`(,spec-mode ,spec-index))
                            (and (eq hist-mode spec-mode)
                                 (or (not spec-index)
                                     (eq hist-index spec-index))))
                          group
                          :key #'ensure-list))
                       dape--info-buffer-display-history)
                      ;; ...or fallback to car if no history
                      (ensure-list (car group))))))
    (when (and maybe-kill (not buffer-displayed-p))
      (cl-loop for buffer in (dape--info-buffer-list)
               do (kill-buffer buffer)))
    (dape-info-update)))