Difference between revisions of "Experimental:Debug module"

From TouchDesigner Documentation
Jump to: navigation, search
 
Line 1: Line 1:
 
{{lowercase}}{{#index:debug Class}}{{TDClassSummary|label=debug|summary=The <code>debug</code> module provides tools for use with TouchDesigner's builtin <code>debug</code> statement. It also contains utilities for customizing those statements and building customized debug output. It is a member of [[Tdu Module]].
 
{{lowercase}}{{#index:debug Class}}{{TDClassSummary|label=debug|summary=The <code>debug</code> module provides tools for use with TouchDesigner's builtin <code>debug</code> statement. It also contains utilities for customizing those statements and building customized debug output. It is a member of [[Tdu Module]].
  
You can use the [[Palette:debugControl|debugControl]] component in the palette.
+
You can use the [[Palette:debugControl|debugControl]] component in the palette to set up <code>debug</code> behavior without using Python.
 
}}
 
}}
 
<section begin=HELPBODY />
 
<section begin=HELPBODY />

Latest revision as of 14:43, 29 October 2020

The debug module provides tools for use with TouchDesigner's builtin debug statement. It also contains utilities for customizing those statements and building customized debug output. It is a member of Tdu Module.

You can use the debugControl component in the palette to set up debug behavior without using Python.


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.