Function: dape-stack-select-up

dape-stack-select-up is an interactive and natively compiled function defined in dape.el.

Signature

(dape-stack-select-up CONN N)

Documentation

Select N (numeric arg) stacks above current selected stack.

Use CONN to specify adapter connection.

Key Bindings

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

Source Code

;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape-stack-select-up (conn n)
  "Select N (numeric arg) stacks above current selected stack.
Use CONN to specify adapter connection."
  (interactive (list (dape--live-connection 'stopped) 1))
  ;; Ensure all threads.  See `dape--stack-trace'.
  (let ((dape--request-blocking t))
    (dape--with-request
        (dape--stack-trace conn (dape--current-thread conn) dape-stack-trace-levels)))
  (if (dape--stopped-threads conn)
      (let* ((frames (plist-get (dape--current-thread conn) :stackFrames))
             (current-n (cl-position (dape--current-stack-frame conn) frames)))
        (dape-select-stack conn (plist-get (nth (+ current-n n) frames) :id)))
    (message "No stopped threads")))