debug Rules
Bazel

debug Rules


dump

dump(obj, obj_name)

Debugging method that recursively prints object fields to stderr

Example Usage:

load("debug", "dump")
...
dump(ctx, "ctx")

Example Output:

WARNING: /code/rrrrr/subpar/debug.bzl:11:5:
ctx[ctx]:
    action[string]: <getattr(action) failed>
    attr[struct]:
        _action_listener[list]: []
        _compiler[RuleConfiguredTarget]:
            data_runfiles[runfiles]:

Attributes

obj

Unknown; Required

Object to dump

obj_name

Unknown; Required

Name to print for that object