how to debug bazel skylark script step by step with a debugger
Unfortunately there's no Skylark debugger yet.
Though it's not a debugger, you can use print
to print debug messages.
Use VSCode with the Bazel plugin. In the future, I hope other IDEs/tools will support the protocol too.
@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