Closed the42 closed 7 months ago
Hi!
This smells like the auto port functionallity is failing on windows.
Could you test with the following configuration:
(add-to-list 'dape-configs
'(dlv
modes (go-mode go-ts-mode)
ensure dape-ensure-command
command "dlv"
command-args ("dap" "--listen" "127.0.0.1:5678")
command-cwd dape-cwd-fn
port 5678
:request "launch"
:type "debug"
:cwd dape-cwd-fn
:program dape-cwd-fn))
Indeed, that got me further, thank you. The Window layout changes and on the status line is written Dape:starting
. However, this get's soon replaced with Dape:timeout
which in turn is replaced with Dape:initialized
.
When I try to restart with d
in repl, the prompt is dlv command-cwd "c:/Users/USER/code/Thesaurushelper/" :cwd "c:/Users/USER/code/Thesaurushelper/" :program "c:/Users/USER/code/Thesaurushelper/"
so the actual executable is missing. That MAY be ok as dlv knows about the go ecosystem and like the go
- tool itself is ware how to start an executable givein it's source path.
When I accept that prompt, Dape times out again.
Hmmm strange. Could you please share your dape-debug buffer again?
Sorry, took a while, here we go:
[info] Starting new multi session
[info] Server process started ("dlv" "dap" "--listen" "127.0.0.1:5678")
[std-server] Server stdout:
DAP server listening at: 127.0.0.1:5678
[info] Connection to server established localhost:5678
[io] Sending:
(:arguments (:clientID "dape" :adapterID "debug" :pathFormat "path" :linesStartAt1 t :columnsStartAt1 t :supportsRunInTerminalRequest t :supportsProgressReporting t :supportsStartDebuggingRequest t) :type "request" :command "initialize" :seq 1)
[io] Received:
(:seq 0 :type "response" :request_seq 1 :success t :command "initialize" :body (:supportsConfigurationDoneRequest t :supportsFunctionBreakpoints t :supportsConditionalBreakpoints t :supportsEvaluateForHovers t :supportsSetVariable t :supportsExceptionInfoRequest t :supportsDelayedStackTraceLoading t :supportsLogPoints t :supportsDisassembleRequest t :supportsClipboardContext t :supportsSteppingGranularity t :supportsInstructionBreakpoints t))
[io] Sending:
(:arguments (:request "launch" :type "debug" :cwd "c:/Users/HoechtlJ/code/Thesaurushelper/" :program "c:/Users/HoechtlJ/code/Thesaurushelper/") :type "request" :command "launch" :seq 2)
[error] Timeout for reached for seq 2
[io] Sending:
(:arguments (:restart nil) :type "request" :command "disconnect" :seq 3)
[io] Received:
(:seq 0 :type "event" :event "initialized")
[io] Sending:
(:arguments (:breakpoints []) :type "request" :command "setFunctionBreakpoints" :seq 4)
[io] Received:
(:seq 0 :type "response" :request_seq 2 :success t :command "launch")
[info]
Process nil exited with 256
[info]
Process ("dlv" "dap" "--listen" "127.0.0.1:5678") exited with 0
[error] Timeout for reached for seq 3
Hi would it be possible to try with the latest on master as it gives more information from the logs and does not send the setFunctionBreakpoints. You have to install it from source with straight or load-file
.
Closing this issue, feel free to reopen if you have tried it with an later release and followed the "Bugs and issues" section in the readme
Thank you, with the sippet you provided it works now out of the box!
Hi!
This smells like the auto port functionallity is failing on windows.
Could you test with the following configuration:
(add-to-list 'dape-configs '(dlv modes (go-mode go-ts-mode) ensure dape-ensure-command command "dlv" command-args ("dap" "--listen" "127.0.0.1:5678") command-cwd dape-cwd-fn port 5678 :request "launch" :type "debug" :cwd dape-cwd-fn :program dape-cwd-fn))
I did read https://github.com/svaante/dape#go---dlv
dlv is in my path
I am within a golang project,
M-x compile
set togo build
works. eglot gopls is successfully attached (and providing eg. completions through capfs)I did inspect *dape-debug*:
and *dape-processes* which is empty.
I start dape using
M-x dape
and I am prompted withdlv command-cwd "c:/Users/UNAME/code/PROJ/" :cwd "c:/Users/UNAME/code/PROJ/" :program "c:/Users/UNAME/code/PROJ/"
I leave it as such. After maybe 10 seconds I am prompted with the error message "unable to connect to server localhost:0"
a simple
dlv dap
successfully starts up. What am I doing wrong or where can I find more debug information about the underlying issue?