I dig around Bazel source code, there aren't much logging it seems. Is there a way to enable some kind of verbose mode so I can see what bazel is doing?
Also there seems to be various kind of debug options but I cant seem to comprehend yet, if I want to debug say java_library how should I do it?
When running a build or a test, Bazel does the following: Loads the BUILD files relevant to the target. Analyzes the inputs and their dependencies, applies the specified build rules, and produces an action graph. Executes the build actions on the inputs until the final build outputs are produced.
Bazel allows you to perform a build from a completely read-only volume. To build a program with Bazel, type bazel build followed by the target you want to build. After issuing the command to build //foo , you'll see output similar to this: INFO: Analyzed target //foo:foo (14 packages loaded, 48 targets configured).
Path: On Linux/macOS/Unixes: /etc/bazel. bazelrc. On Windows: %ProgramData%\bazel.
To debug what Bazel does and why:
To debug programs you built with Bazel:
bazel-bin/path/to/java/program --debug=<port>
EDIT: added info about --verbose_failures
and --verbose_explanations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With