Support Forum

Debug polygonArc() - how to printf?

Susannah

Tuesday 18th February 2020
Hello, I am trying to debug a design, which includes a call for a polygonArc() for a range of cavity lengths and angles. Is there a way to print the values of variables, either int, double or string into a window in order to assist with the debug?
J├╝rgen
LayoutEditorFull
Tuesday 18th February 2020
Hi Susannah, yes, there are debug features in the macro code: ```cpp int i=45,k=6; string s="test"; debug(i,k); // variablew will be printed to the debug output. debug(s); debug.show(); // a text editro window will open with all previous debug output debug.clear(); // prevoious debug output is removed debug.saveTo("filename"); // store previous debug output to disk ``` Some more debug commands are described ihere: [https://layouteditor.org/layoutscript/macros-with-c-script/c-code](https://layouteditor.org/layoutscript/macros-with-c-script/c-code)