[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dape 72d993031c 3/5: Experimental startDebugging change
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dape 72d993031c 3/5: Experimental startDebugging changes #62 |
Date: |
Fri, 2 Feb 2024 06:57:44 -0500 (EST) |
branch: externals/dape
commit 72d993031cced50a43835ab0750ebf58610924ac
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>
Experimental startDebugging changes #62
The adventure with startDebugging continues, and it's still not clear
how one goes about selecting the right debugging session.
Current strategy is pretty simple, use last session from
startDebugging if that one terminates use parent connection.
Have still no idea if this will work, but seams ok in js-debug and
debugpy with django and matplotlib stuff.
---
dape.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/dape.el b/dape.el
index af1a00e0a7..0804e4b4a3 100644
--- a/dape.el
+++ b/dape.el
@@ -1449,8 +1449,7 @@ Starts a new adapter connection as per request of the
debug adapter."
(let ((new-connection
(dape--create-connection config (or (dape--parent conn)
conn))))
- (unless (dape--thread-id conn)
- (setq dape--connection new-connection))
+ (setq dape--connection new-connection)
(dape--start-debugging new-connection)))
nil)
@@ -1858,8 +1857,11 @@ terminate. CONN is inferred for interactive
invocations."
(dape-kill cb 'with-disconnect)
(unless skip-shutdown
(jsonrpc-shutdown conn))
- (when (functionp cb)
- (funcall cb))))))
+ (if-let* (((not skip-shutdown))
+ (parent (dape--parent conn)))
+ (dape-kill parent cb with-disconnect skip-shutdown)
+ (when (functionp cb)
+ (funcall cb)))))))
((and conn
(jsonrpc-running-p conn))
(dape-request conn
@@ -1871,8 +1873,11 @@ terminate. CONN is inferred for interactive
invocations."
(dape--callback
(unless skip-shutdown
(jsonrpc-shutdown conn))
- (when (functionp cb)
- (funcall cb)))))
+ (if-let* (((not skip-shutdown))
+ (parent (dape--parent conn)))
+ (dape-kill parent cb with-disconnect skip-shutdown)
+ (when (functionp cb)
+ (funcall cb))))))
(t
(when (functionp cb)
(funcall cb)))))