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

Extending lsp.client with support for DAP #8098

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jtulach
Copy link
Contributor

@jtulach jtulach commented Dec 29, 2024

I'd like NetBeans to have a support for DAP. To debug GraalVM based languages as well as Python, for example.

@jtulach jtulach added JavaScript [ci] enable web job and extra JavaScript tests (webcommon/javascript2.editor) LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests GraalVM [ci] enable GraalVM tests debugger labels Dec 29, 2024
@jtulach jtulach self-assigned this Dec 29, 2024
@jtulach
Copy link
Contributor Author

jtulach commented Dec 29, 2024

Debugging Python inside NetBeans

Run the Python file like this:

$ python -m debugpy --listen localhost:5678 --wait-for-client <file>.py

It should now wait for connections from the IDE. In the IDE, select Debug/Attach Debugger...:

debugger-attach-debugger

In the dialog, fill in:

  • Debugger: Debugger Adapter Protocol (DAP) Debugger
  • Hostname: localhost
  • Port: 5678
  • Connection type: Attach
  • Additional configuration:
{
    "arguments": {}
}
  • Attach after configure - unchecked

attach-debugger

Confirm the dialog - the IDE should now debug the Python code.

@jtulach
Copy link
Contributor Author

jtulach commented Dec 30, 2024

The debugging works with GraalVM based languages as well. Just download GraalVM for JDK 17 and Graal.js 17 and debug sieve.js with following command sieve/js$ /graalvm-17/bin/js --dap sieve.js:

image

debugger connects and one can step over the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugger GraalVM [ci] enable GraalVM tests JavaScript [ci] enable web job and extra JavaScript tests (webcommon/javascript2.editor) LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants