pypyr.steps.debug permalink

debug the context permalink

Pretty print the context to output.

Print the pypyr context to the pypyr output. This is likely to be the console. This may assist in debugging when trying to see what values are what.

debug prints to the INFO (20) log-level. This means you won’t see debug output unless you specify pypyr mypype --log 20 or lower value for log. If you have values you that always want to print to output, echo is the more natural step to use.

Obviously, be aware that if you have sensitive values like passwords in your context you probably want to be careful about this. No duh.

All inputs are optional. This means you can run debug in a pipeline as a simple step just with:

  - name: my.arb.step
      arb: arb1
  - pypyr.steps.debug # use debug as a simple step, with no config
  - name: another.arb.step
      another: value

In this case it will dump the entire context as is without applying formatting.

optional inputs permalink

Debug supports the following optional inputs:

debug: # optional
  keys: keytodump # optional. str for a single key name to print.
                  # or a list of key names to print ['key1', 'key2'].
                  # if not specified, print entire context.
  format: False # optional. Boolean, defaults False.
                # Applies formatting expressions to output.

See some worked examples to use debug to pretty print context.

see also

last updated on .