Code Monkey home page Code Monkey logo

stardbg's Introduction

Experimental debugger for Starlark

This is a standalone debugger for Starlark ,with a web-based UI. In theory, it can be used to debug any Starlark code that uses the same debugging protocol. At the moment, the only known compatible server is Bazel.

This is the first draft, there are lots of rough edges and known limitations.

Screenshot

Example of use

  1. Run your normal Bazel command with --experimental_skylark_debug, e.g.
bazel build --experimental_skylark_debug //my:target

The command will hang until a debugger is attached.

  1. In a different shell, run the debugger from the stardbg repository. Choose where you want your initial breakpoints using an absolute path and a line number, e.g.
bazel run :stardbg -- /home/myself/dir/my/BUILD.bazel:3

Of course, the file should be inside the repository you are debugging (a file used by //my:target).

  1. Open a browser at http://localhost:8080/

Caveats

  • A breakpoint will be effective only when the corresponding line is evaluated. Since Bazel aggressively caches the results, you may want to do a spurious change to a file to force a re-evaluation.

  • At the moment, you need to kill and rerun the debugger each time you restart a debugging session. Also, reload the web page.

  • Supported features: display of local variables (in each level of the stack trace), support for threads (you can choose which thread to debug, switch thread, etc.).

  • Missing features: conditional breakpoints, evaluation of custom expressions. The visualization of values is very limited.

Alternative

stardbg's People

Contributors

laurentlb avatar

Stargazers

Davide Asnaghi avatar Anubis avatar Vladimir Shabunin avatar lee avatar Alexey Reznichenko avatar Giovanny Gutiérrez avatar  avatar David Sanderson avatar Boran Car avatar Kseniia Dorofeeva avatar C.J. Winslow avatar west avatar Kyle Cordes avatar Konstantin Erman avatar Paul Cody Johnston avatar Austin Cawley-Edwards avatar Jin avatar Orr Sella avatar Mike Morearty avatar Nikhil Kalige avatar  avatar

Watchers

Andrew Z Allen avatar Mike Morearty avatar  avatar Orr Sella avatar Konstantin Erman avatar  avatar

Forkers

rogerhu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.