Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete-session bug reporting.. not killing output buffer #771

Open
pcompassion opened this issue Jan 13, 2024 · 0 comments
Open

delete-session bug reporting.. not killing output buffer #771

pcompassion opened this issue Jan 13, 2024 · 0 comments

Comments

@pcompassion
Copy link
Contributor

bug reporting..

(lsp-defun dap-delete-session ((debug-session &as &dap-session 'output-buffer 'program-proc))
  "Remove DEBUG-SESSION.
If the current session it will be terminated."
  (interactive (list (dap--cur-session-or-die)))
  (let* ((cleanup-fn (lambda ()
                       (->> (dap--get-sessions)
                            (-remove-item debug-session)
                            (dap--set-sessions))
                       (when (eq (dap--cur-session) debug-session)
                         (dap--switch-to-session nil))
                       (when output-buffer (kill-buffer buffer)) #should be (kill-buffer output-buffer)
                       (dap--refresh-breakpoints))))
    (if (not (dap--session-running debug-session))
        (funcall cleanup-fn)
      (dap-request debug-session "disconnect" :restart :json-false)
      (lambda (_resp)
        (when (and program-proc (process-live-p program-proc))
          (kill-process program-proc))
        (funcall cleanup-fn)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant