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

Add starlark debugger python script interface #24814

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

Conversation

quic-torgil
Copy link
Contributor

This patch will add a python acript interface to the debugger together with the following tools:

  • Interactive debugger
  • Trace tool

See README.md for more information

@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Jan 2, 2025
@quic-torgil quic-torgil force-pushed the add-starlark-debugger-python-script-interface branch from fc6c872 to 704d1ff Compare January 2, 2025 10:32
@quic-torgil quic-torgil force-pushed the add-starlark-debugger-python-script-interface branch 3 times, most recently from f64ceff to 1b2ff96 Compare January 2, 2025 14:02
@quic-torgil
Copy link
Contributor Author

quic-torgil commented Jan 2, 2025

See discussion in #13387.
Demo here: https://www.youtube.com/watch?v=D7-BbD6QjeU

@quic-torgil quic-torgil force-pushed the add-starlark-debugger-python-script-interface branch 10 times, most recently from 167a9b4 to 540849b Compare January 3, 2025 16:36
@sgowroji sgowroji added the team-Rules-Python Native rules for Python label Jan 6, 2025
@meisterT meisterT requested a review from hvadehra January 8, 2025 12:39
@hvadehra
Copy link
Member

Looks like this could be useful to many folks, thanks for open-sourcing this!

However, it's not clear to me why this needs to be added to the Bazel codebase.

Is there any reason you'd rather not host this in a repository you own? If the worry is going out-of-sync with changes to the debugger protocol, we could consider adding this to our downstream CI. If ease-of-discovery is a concern, we could link this from the documentation somewhere.

@hvadehra hvadehra added awaiting-user-response Awaiting a response from the author P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) and removed awaiting-review PR is awaiting review from an assigned reviewer labels Jan 13, 2025
This patch will add a python script interface to the debugger together
with the following tools:
* Interactive debugger
* Trace tool

See README.md for more information
@quic-torgil quic-torgil force-pushed the add-starlark-debugger-python-script-interface branch from 540849b to dff6652 Compare January 15, 2025 13:48
@quic-torgil
Copy link
Contributor Author

quic-torgil commented Jan 15, 2025

Is there any reason you'd rather not host this in a repository you own?

This has been starved for a while and when I saw new interest in the starlark debugger a PR was most feasible way for me right now to get it "out there" for comments and for people to reach the code. I also saw similar scripts (like ctexplain) were added to the tools section.

If the worry is going out-of-sync with changes to the debugger protocol, we could consider adding this to our downstream CI. If ease-of-discovery is a concern, we could link this from the documentation somewhere.

Awesome suggestions. Thanks. There is a number of factors talking for a separate repo also:

  • Starlark debug protocol may be reused by other starlark implementations
  • Support for multiple versions of Bazel (integration tests)
  • Threshold to fork/improve may be lower if in a separate repo

Usually you want the "latest" version of a debugging tool even if you bisecting Bazel or using an earlier version of it.

There is a few integration issues to solve in a separate repo solution for the user experience to be as seamless as applying this patch and build the dependencies (as well as the same bandwidth issues that has delayed this to begin with).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-user-response Awaiting a response from the author P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-Python Native rules for Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants