Skip to content
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

feat: initialize DAP support #735

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

angelozerr
Copy link
Contributor

feat: initialize DAP support

@angelozerr
Copy link
Contributor Author

@SCWells72 the DAP support should start working, please read https://github.com/redhat-developer/lsp4ij/blob/2b3b0ce556aa71f286beb770764726baa769f55a/docs/dap/user-defined-dap/vscode-js-debug.md to test debugging with JavaScript and VSCode JS Debug.

@angelozerr angelozerr added the dap Debugging Adapter Protocol label Jan 9, 2025
@angelozerr angelozerr added this to the 0.10.0 milestone Jan 9, 2025
@angelozerr
Copy link
Contributor Author

@CppCXY I have started to implement a DAP support.

I wonder if you could be interested with this DAP support to provide the capability to debug lua files by consuming a DAP lua debugger. My quick search about DAP lua debugger is https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation#local-lua-debugger-vscode

@CppCXY
Copy link
Contributor

CppCXY commented Jan 10, 2025

@CppCXY I have started to implement a DAP support.

I wonder if you could be interested with this DAP support to provide the capability to debug lua files by consuming a DAP lua debugger. My quick search about DAP lua debugger is https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation#local-lua-debugger-vscode

I have implemented and maintained emmylua debugger myself, and it supports both DAP and debugging based on IntelliJ xdebugger. When I have time, I will try the intellij DAP api you implemented.

@angelozerr
Copy link
Contributor Author

@CppCXY I have started to implement a DAP support.

I wonder if you could be interested with this DAP support to provide the capability to debug lua files by consuming a DAP lua debugger. My quick search about DAP lua debugger is https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation#local-lua-debugger-vscode

I have implemented and maintained emmylua debugger myself, and it supports both DAP and debugging based on IntelliJ xdebugger. When I have time, I will try the intellij DAP api you implemented.

Nice!

Could yiu give me some links where you have implemented your DAP client ?

@CppCXY
Copy link
Contributor

CppCXY commented Jan 10, 2025

@angelozerr
Copy link
Contributor Author

https://github.com/EmmyLua/VSCode-EmmyLua/blob/master/src/debugger

Your link is about DAP lua server, but what about DAP client implemented in IntelliJ?

@CppCXY
Copy link
Contributor

CppCXY commented Jan 10, 2025

@angelozerr
Copy link
Contributor Author

https://github.com/EmmyLua/VSCode-EmmyLua/blob/master/src/debugger

Your link is about DAP lua server, but what about DAP client implemented in IntelliJ?

https://github.com/EmmyLua/VSCode-EmmyLua/blob/master/src/debugger/base/EmmyDebugSession.ts

I am sorry again. It seems this code is the DAP client written in ts used by vscode.

My question is about the DAP client written in Java and Intellij XDebugSession.

@CppCXY
Copy link
Contributor

CppCXY commented Jan 10, 2025

https://github.com/EmmyLua/VSCode-EmmyLua/blob/master/src/debugger

Your link is about DAP lua server, but what about DAP client implemented in IntelliJ?

https://github.com/EmmyLua/VSCode-EmmyLua/blob/master/src/debugger/base/EmmyDebugSession.ts

I am sorry again. It seems this code is the DAP client written in ts used by vscode.

My question is about the DAP client written in Java and Intellij XDebugSession.

Maybe I didn't express myself clearly. We have implemented debugging methods separately: a DAP client based on ts and a debugging based on IntelliJ xdebugger, not IntelliJ's DAP. Additionally, the IntelliJ part was not implemented by me, so I am not very familiar with it.

@angelozerr
Copy link
Contributor Author

based on IntelliJ xdebugger, not IntelliJ's DAP

Ok understood, you don't use DAP debugging with Intellij.

With my current PR you should consume your DAP server that you have written in vscode.

@angelozerr
Copy link
Contributor Author

angelozerr commented Jan 10, 2025

@CppCXY if you can compile your DAP lua debugger written in ts in an one js file (ex: dapDebugServer.js) , you could after that just configure it without developing something like VSCode JSDebug DAP, in otherwise you could do like this:

image

See doc at https://github.com/redhat-developer/lsp4ij/blob/6387467591dd3f3c15c147f98b52d226c422a08a/docs/dap/user-defined-dap/vscode-js-debug.md

If it works, we could host your config in a template like I did for VSCode JS Debug DAP server.

@angelozerr angelozerr force-pushed the dap_support branch 7 times, most recently from d3fcfa8 to f6cc787 Compare January 13, 2025 10:03
@angelozerr angelozerr force-pushed the dap_support branch 5 times, most recently from a010627 to 8e84240 Compare January 13, 2025 21:45
@angelozerr angelozerr marked this pull request as ready for review January 20, 2025 18:05
@angelozerr angelozerr merged commit 3499339 into redhat-developer:main Jan 20, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dap Debugging Adapter Protocol
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants