-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugger implementation #13433
base: main
Are you sure you want to change the base?
Debugger implementation #13433
Conversation
Add documententation and/or an example on how to configure and/enable this for a specific debugger... if not as part of this PR then to the todo list ? |
What if you have e.g. a monorepo with multiple services written in the same language? |
Uhm, I think most of the debug adapters support multiple threads, but need to look more in to that. Not sure how VS Code handles this, if they allow you to run the same debugger adapter twice or more. |
c71eb06
to
47a5f0c
Compare
I'd love to see another more up-to-date video of the current status of this, if u can find time. :-) |
ac95fbd
to
515122c
Compare
HI, I have started a dlv(go dap server) to debug go program, but i need bring env to the dlv commend. I read the code |
Hey, I think most debug adapters support this already by passing in an |
Ok, understand.... I will test it on js debugger and go delve and study your code. |
7eacd30
to
3f8581a
Compare
8adc489
to
8d99f9b
Compare
for those of us trying to follow-along at home on this PR, it would be helpful of there was a sample tasks.json ( or wherever the debug settings are being stored if not there ) and any relevent settings.json we need enable, as I compiled and ran this PR, but was unable to get the same behaviour as either of the screen recordings. |
Hey @davidbuzz, sorry for not posting any examples of starting a debug adapter. I did this for a reason, because I'm not happy yet with the naming of the fields & structure of the task. But here is an example task to start a debug adapter: If you want to follow a bit more about what we are working on, you can join the following channel: https://zed.dev/channel/zed-debugger-11370. {
"label": "Xdebug debug adapter",
"command": "bun",
"args": [
"/Users/remcosmits/Documents/code/vscode-php-debug/out/phpDebug.js",
"--server=8132"
],
"task_type": "debug",
"cwd": "/Users/remcosmits/Documents/code/symfony_demo",
"debug_adapter": {
"id": "xdebug",
"port": 8132,
"request_args": {
"skipFiles": ["**/vendor/**"],
"pathMappings": {
"/Users/remcosmits/Documents/code/symfony_demo/public": "/Users/remcosmits/Documents/code/symfony_demo/public"
},
"localSourceRoot": "/Users/remcosmits/Documents/code/symfony_demo",
"serverSourceRoot": "/Users/remcosmits/Documents/code/symfony_demo",
"xdebugSettings": {
"show_hidden": 1
}
}
}
} |
d9461c3
to
b6e677e
Compare
i think u mean this discord channel, but u were close.. https://discord.com/channels/869392257814519848/1255246362220691456 ... i pop in to the Zed discord occassionally. :-) |
No, that's not what I mean. What do you mean by I'm close? It sounds a bit disparaging... |
I was just trying to say that the link u gave starting with https://zed.dev doesn't work for me. |
Ahh oké. it seems to work for other people. Also it's the same as the one that i posted in the discord channel. Does it still not work for you? |
... im on linux. :-) |
…function istead of a response func
Request handlers are now called with an error when a DAP server doesn't support a request we attempt to send. This allows response handlers to handle more errors gracefully I added a new thread status "Stepping" that represents the intermediate state of a thread when we send a step command and haven't gotten a response. This allows us to handle error responses correctly and disable sending multiple step requests for the same thread while any are being processed
I also did a mini refactor to how we send breakpoints. Now there are two functions send_all_breakpoints and send_breakpoints_from_path that Session::Local mode uses. send_all_breakpoints is used in the initialization process of a DAP server and when toggling ignore breakpoints. send_breakpoints_from_path is used to let DAP servers know when there has been an update to breakpoint's in a specific file and when a file has been saved
This also allows us to remove the _unused field too. Co-authored-by: Piotr <[email protected]>
…w Architecture This is the first step to getting RunInTerminal support back, the second is testing. While Remco didn't pair up with me for this commit, almost everything I added back was based on his work with minor modifications. So I put him as a co-author Co-authored-by: Remco Smits <[email protected]>
I had to add error checking to the cwd where the debug panel handles the request
It also fails when the configuration sequence has any failures too
This commit also changes the indicies to be the variable names instead of their IDs. Because that's the only thing that is safe to use across stopping states.
work properly We also clean up a lot of the misdirection in the code to improve readability. Co-authored-by: Remco Smits <[email protected]>
Co-authored-by: Remco Smits <[email protected]>
Its because it requires the session to exist, but we did not insert the session early enough so we hitted an early return because the session couldn't be found.
DISCLAIMER
END OF DISCLAIMER
The current state of the debugger implementation:
Screen.Recording.2024-10-16.at.15.02.20.mov
Screen.Recording.2025-01-19.at.17.45.06.mov
All the todo's are in the following channel, so it's easier to work on this together:
https://zed.dev/channel/zed-debugger-11370
If you are on Linux, you can use the following command to join the channel:
Current Features
Release Notes: