Jiewen Zheng
Jiewen Zheng

Reputation: 93

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

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!

Upvotes: 7

Views: 4192

Answers (3)

Laurent
Laurent

Reputation: 2999

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

Upvotes: 3

Ittai
Ittai

Reputation: 5915

@László is correct though there has been some work done on this which you might be able to utilize.

See this thread from bazel-dev: [Design doc] Debugging Protocol for Skylark and Bazel Integration

Upvotes: 2

László
László

Reputation: 4271

Unfortunately there's no Skylark debugger yet.

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

Upvotes: 4

Related Questions