branch: externals/dape
commit 29a3cbfddaf93e578e24b655516b599b23531c0e
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>

    Disable timeout for launch/attach request
---
 dape.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/dape.el b/dape.el
index fef0ce3d104..868eb54c194 100644
--- a/dape.el
+++ b/dape.el
@@ -1712,14 +1712,17 @@ If `dape--request-blocking' is non-nil do blocking 
request."
 
 (defun dape--launch-or-attach (conn)
   "Launch or attach CONN."
-  (dape--with-request-bind
-      (_body error)
-      (dape-request conn
-                    (or (plist-get (dape--config conn) :request) :launch)
-                    (dape--launch-or-attach-arguments conn))
-    (when error
-      (dape--warn "%s" error)
-      (dape-kill conn))))
+  ;; Some adapters (e.g. dlv) delay launch/attach response until
+  ;; ready (after compile).
+  (let ((dape-request-timeout nil))
+    (dape--with-request-bind
+        (_body error)
+        (dape-request conn
+                      (or (plist-get (dape--config conn) :request) :launch)
+                      (dape--launch-or-attach-arguments conn))
+      (when error
+        (dape--warn "%s" error)
+        (dape-kill conn)))))
 
 (defun dape--set-breakpoints-in-source (conn source &optional cb)
   "Set breakpoints in SOURCE for adapter CONN.

Reply via email to