Comments (7)
I noticed in the latest dap-mode code - testing and integrating some of my changes there is support for the startDebugging request. This isn't enabled within the initialisation parameters and also currently doesn't work with debugpy. The processing filter returns:
error in process filter: or: :debugServer or :dap-server-path should be present
error in process filter: :debugServer or :dap-server-path should be present
I'm not sure what the current status of this work is? For this to work dap-server-path would have to be nil and debugServer should be set to the port from the original message. Looks like this function was added as part of 'Initial integration of new node js debugger' by @yyoncho .
from dap-mode.
This is an example startDebugging request message sent by debugpy in a multi-process scenario. In this case the launch-args are different from the scenario tested with the node js debugger. Here we may have launched a process with a straight command line (no attach), but the second process spawned is now requesting that we create a new session and attach to the sub-process.
{
"seq": 22,
"type": "request",
"command": "startDebugging",
"arguments": {
"request": "attach",
"configuration": {
"type": "python-run-with-python-path",
"name": "Subprocess 21490",
"module": "package.runner",
"cwd": "/home/dsyzling/dev/dap-multi-process",
"python": [
"/home/dsyzling/miniconda3/envs/dap-multi-process/bin/python"
],
"isOutputRedirected": null,
"subProcessId": 21490,
"connect": {
"host": "127.0.0.1",
"port": 57819
}
}
}
}
from dap-mode.
Something like this (excuse the poor emacs lisp and dash binding), which checks to see if there's a nested "connect" key and uses this to initiate the new session. However I think this still fails when the child session terminates and doesn't restore the current connection back to the parent?
(lsp-defun dap--start-debugging ((debug-session &as &dap-session 'launch-args 'proc 'name)
(&hash "seq" "arguments"
(&hash "configuration" (&hash "connect")
"request" "configuration")))
(-let* (((&plist :debugServer port :host) launch-args)
(new-launch-args (list
:host (if connect (gethash "host" connect) host)
:debugServer (if connect (gethash "port" connect) port)
:request request
:name (format "Child of %s" name))))
(ht-aeach (plist-put new-launch-args (intern (concat ":" key)) value) configuration)
(dap-start-debugging-noexpand new-launch-args)
(dap--send-message (dap--make-success-response
seq "startDebugging")
(dap--resp-handler) debug-session)))
from dap-mode.
Related Issues (20)
- How to specify the java version when I debug the program with dap-debug HOT 1
- Breakpoints not working with debugpy HOT 3
- Rust debugger doesn't print array elements in local variables HOT 2
- Cannot run DAP for Python - dap-exception-breakpoints HOT 1
- dap-ui-locals "Invalid menu item in easymenu" in Emacs 29
- Support gdb's built-in DAP implementation HOT 1
- [golang] Expanding map only shows len() not content. HOT 3
- Default Go Dlv Attach Configuration Failing
- dap-dlv-go .env variables with special characters problem
- Typescript - dap-hydra/dap-disconnect does not clean up enabled modes
- [Q] Question about dap-ui-locals and variable expansion HOT 3
- Crashes on breakpoint (Python) HOT 5
- Question: Configuring `launch.json` for Debugging MPI C++ Code with LLDB on Mac M1 HOT 4
- doc missing HOT 2
- `Treemacs` issue when trying to utilize `dap-mode`
- company-mode off-by-one error regarding prefix length in dap-ui-repl
- delete-session bug reporting.. not killing output buffer
- Trying to debug C++ code running in a docker container with gdbserver but can't seem to connect
- Debug attach template still asking for a file to run
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dap-mode.