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

Debug Starlark Program Directly #223

Open
wulixzCN opened this issue May 23, 2022 · 2 comments
Open

Debug Starlark Program Directly #223

wulixzCN opened this issue May 23, 2022 · 2 comments

Comments

@wulixzCN
Copy link

I am using Starlark language to develop the project recently.
I wanna know can I debug the Starlark Program directly?
I read some documents like bazel, starlark debugger,etc. but no result...
Ask for help.

@adonovan
Copy link
Contributor

Bazel, which uses the Java implementation of Starlark, has a BUILD-file debugger, which uses some hooks in the interpreter, but there is no debugger for pure Starlark outside of Bazel. You could build one by modifying the Bazel code, though I would not regard the debug API as stable, and there is certainly a lot of room for improvement.

(In the Go implementation of Starlark, I once started work on a debugger but put it aside and don't expect to return to it any time soon.)

@ndmitchell
Copy link
Contributor

There is actually a DAP debugger in the Rust Starlark code - https://github.com/facebookexperimental/starlark-rust/tree/main/starlark/bin/dap is the code, but it's hard to integrate with projects that extend Starlark. But you can debug a pure-Starlark program.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants