Experimental:debug module

From TouchDesigner Documentation
Revision as of 17:23, 17 October 2020 by Ivan (talk | contribs)
Jump to: navigation, search

The debug module facilitates debug print statements to the textport. It also contains utilities for customizing those statements and building customized debug output. It is a member of Tdu Module.


Members[edit]

styletypes.SimpleNamespace :

A namespace containing information about how to process debug statements. This data is not meant to be changed directly. Instead, use the setStyle function below.

Methods[edit]

setStyle(useRepr=None, showDAT=None, showFunction=None, showLineNo=None, suppress=None, formatOverride=None, functionOverride=None)None:

Set the style for the built in TD debug function. Any arguments passed as None will leave that feature unchanged.

useRepr: if True, convert all non-string args to debug to repr(arg)
showDAT: in debug message, show the DAT where debug was called
showFunction: in debug message, show function where debug was called
showLineNo: in debug message, show line number where debug was called
suppress: if True, suppress (don't print) any debug calls
formatOverride: overrides the default message that debug prints. You can use {0}, {1}, and {2} for DAT, function, and line number
functionOverride: overrides the builtin TD debug function. This function will be called with all arguments from any debug calls in your project. Set to False to remove override.

debug(*args)None:

Print all args and extra debug info (default is DAT and line number) to texport. To change behavior, use the setStyle function.

debugs(*args)str:

Return the string that would be printed by the debug function. To change behavior, use the setStyle function.

info(*args, stackOffset=0)list:

Return all args and extra debug info as processed by the debug function. To change behavior, use the setStyle function.


An Operator Family that manipulates text strings: multi-line text or tables. Multi-line text is often a command Script, but can be any multi-line text. Tables are rows and columns of cells, each containing a text string.