Bazel是否有冗长的日志记录? [英] Is there verbose logging for Bazel?
本文介绍了Bazel是否有冗长的日志记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我研究了Bazel源代码,似乎没有太多日志记录.有没有一种方法可以启用某种详细模式,以便我可以看到bazel在做什么?
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?
似乎还有各种各样的调试选项,但是我似乎还无法理解,如果我想调试说java_library我应该怎么做?
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?
推荐答案
调试Bazel的功能以及原因:
To debug what Bazel does and why:
- 要列出Bazel执行的命令,请使用-[ no]子命令"标志.
- 要请求仅列出失败的命令,请使用- [no] verbose_failures标志.
- 要请求撰写有关版本的说明,请使用- -explain"标志.使用-[no] verbose_explanations"调整详细程度.
- To list the commands Bazel executes, use the "--[no]subcommands" flag.
- To request listing just the failing commands, use the "--[no]verbose_failures" flag.
- To request writing an explanation of the build, use the "--explain" flag. Use "--[no]verbose_explanations" to adjust verbosity.
要调试使用Bazel构建的程序,请执行以下操作:
To debug programs you built with Bazel:
- 您无法调试java_library规则
- 您可以调试java_binary规则.使用"-c dbg"进行构建(请参见"--compilation_mode"标志),然后使用
bazel-bin/path/to/java/program --debug=<port>
运行二进制文件
- You cannot debug java_library rules
- You can debug java_binary rules. Build with "-c dbg" (see the "--compilation_mode" flag), then run the binary with
bazel-bin/path/to/java/program --debug=<port>
添加了有关--verbose_failures
和--verbose_explanations
这篇关于Bazel是否有冗长的日志记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文