[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dape 98c3865e56 13/13: Add `debugpy-module' default con
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dape 98c3865e56 13/13: Add `debugpy-module' default configuration |
Date: |
Tue, 5 Mar 2024 18:57:52 -0500 (EST) |
branch: externals/dape
commit 98c3865e565ca035b643e932ac5f025ea3e93186
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>
Add `debugpy-module' default configuration
---
dape.el | 54 ++++++++++++++++++++++++++++++++----------------------
1 file changed, 32 insertions(+), 22 deletions(-)
diff --git a/dape.el b/dape.el
index e3f44606a4..64c34bbaa0 100644
--- a/dape.el
+++ b/dape.el
@@ -130,28 +130,38 @@
:cwd "."
:program "a.out"
:MIMode ,(seq-find 'executable-find '("lldb" "gdb")))
- (debugpy
- modes (python-mode python-ts-mode)
- ensure (lambda (config)
- (dape-ensure-command config)
- (let ((python
- (dape--config-eval-value (plist-get config 'command))))
- (unless (zerop
- (call-process-shell-command
- (format "%s -c \"import debugpy.adapter\"" python)))
- (user-error "%s module debugpy is not installed" python))))
- command "python"
- command-args ("-m" "debugpy.adapter" "--host" "0.0.0.0" "--port"
:autoport)
- port :autoport
- :request "launch"
- :type "executable"
- :cwd dape-cwd
- :program dape-buffer-default
- :args []
- :justMyCode nil
- :console "integratedTerminal"
- :showReturnValue t
- :stopAtEntry t)
+ ,@(let ((debugpy
+ `(modes (python-mode python-ts-mode)
+ ensure (lambda (config)
+ (dape-ensure-command config)
+ (let ((python (dape-config-get config 'command)))
+ (unless (zerop
+ (call-process-shell-command
+ (format "%s -c \"import debugpy.adapter\""
python)))
+ (user-error "%s module debugpy is not installed"
python))))
+ command "python"
+ command-args ("-m" "debugpy.adapter" "--host" "0.0.0.0"
"--port" :autoport)
+ port :autoport
+ :request "launch"
+ :type "python"
+ :cwd dape-cwd))
+ (common
+ `(:args []
+ :justMyCode nil
+ :console "integratedTerminal"
+ :showReturnValue t
+ :stopAtEntry t)))
+ `((debugpy ,@debugpy
+ :program dape-buffer-default
+ ,@common)
+ (debugpy-module ,@debugpy
+ :module (lambda ()
+ (thread-first default-directory
+ (directory-file-name)
+ (file-name-split)
+ (last)
+ (car)))
+ ,@common)))
(dlv
modes (go-mode go-ts-mode)
ensure dape-ensure-command
- [elpa] externals/dape f76af2ad10 02/13: Improve documentation on `dape--config-ensure', (continued)
- [elpa] externals/dape f76af2ad10 02/13: Improve documentation on `dape--config-ensure', ELPA Syncer, 2024/03/05
- [elpa] externals/dape af99b57032 07/13: Improve formatting in `dape--config-diff', ELPA Syncer, 2024/03/05
- [elpa] externals/dape 7a869a5c92 04/13: Improve formatting in `dape--config-from-string', ELPA Syncer, 2024/03/05
- [elpa] externals/dape bca98f4395 08/13: Rework function evaluation in minibuffer hints, ELPA Syncer, 2024/03/05
- [elpa] externals/dape 610576b4e6 11/13: Fix hint buffer error face, ELPA Syncer, 2024/03/05
- [elpa] externals/dape 75cf39ad2f 06/13: Improve formatting `dape--config-diff', ELPA Syncer, 2024/03/05
- [elpa] externals/dape e79a7b9ebb 05/13: Improve documentation of `dape--config-from-string', ELPA Syncer, 2024/03/05
- [elpa] externals/dape 0abcd8836f 09/13: Show value evaluation error in hint minibuffer, ELPA Syncer, 2024/03/05
- [elpa] externals/dape 7c4203dc89 12/13: Add `dape-config-get' to evaluate config key value, ELPA Syncer, 2024/03/05
- [elpa] externals/dape 725c50b692 10/13: Use lambda functions instead of named functions in dape-configs, ELPA Syncer, 2024/03/05
- [elpa] externals/dape 98c3865e56 13/13: Add `debugpy-module' default configuration,
ELPA Syncer <=