Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to debug bazel skylark script step by step with a debugger

Tags:

bazel

I am trying to compile my c++ code with bazel. i want to dig deeply into what happened behind the surface. is there any debugger tool(like a gdb debugger) that can be used to debug the google bazel skylark code, i want to track the bazel skylark script execution step by step and how?

Thanks!

like image 462
Jiewen Zheng Avatar asked Apr 25 '18 05:04

Jiewen Zheng


People also ask

What is Starlark language?

Starlark is a dialect of Python intended for use as a configuration language. A Starlark interpreter is typically embedded within a larger application, and this application may define additional domain-specific functions and data types beyond those provided by the core language.


2 Answers

Unfortunately there's no Skylark debugger yet.

Though it's not a debugger, you can use print to print debug messages.

like image 121
László Avatar answered Oct 29 '22 17:10

László


Use VSCode with the Bazel plugin. In the future, I hope other IDEs/tools will support the protocol too.

like image 32
Laurent Avatar answered Oct 29 '22 15:10

Laurent