Table of Contents
The generic flags to add more information to the stack traces or to the messages is -v (verbosity), it is used to display the command-lines executed during a build:
$ waf -v
To display all the traces (useful for bug reports), use the following flag:
$ waf -vvv
Debugging information can be filtered easily with the flag zones:
$ waf --zones=action
Tracing zones must be comma-separated, for example:
$ waf --zones=action,envhash,task_gen
The Waf module Logs replaces the Python module logging. In the source code, traces are provided by using the debug function, they must obey the format "zone: message" like in the following:
Logs.debug("task: task %r must run as it was never run before or the task code changed" % self)
The following zones are used in Waf:
Table 11.1. Debugging zones
Zone | Meaning |
---|---|
runner | command-lines executed (enabled when -v is provided without debugging zones) |
task_gen | task creation (from task generators) |
action | functions to execute for building the targets |
env | environment contents |
envhash | hashes of the environment objects - helps seeing what changes |
build | build context operations such as filesystem access |
deps | implicit dependencies found (task scanners) |