the fair gds editor DebugExample

Macro Debugging

A output for debugging can be created with a macro. This macro shows an trivial example for it. (introduced with version 20120824)

Download: debug-example.layout

   1 #!/usr/bin/layout
   2 #name=debug example
   3 #help=example for using the debug features
   4 
   5 
   6 int main(){
   7   debug("first debug text");
   8 
   9   debug.clear(); // remove previous debug output
  10   debug("lists numbers 1 to 10");
  11   int i;
  12   for(i=1;i<=10;i++){
  13     debug("i=",i);
  14   }
  15   debug.show(); // open a text editor with debug report
  16 
  17   debug.saveTo("/home/me/debug.txt"); // saves the debug data to file
  18 }

See also


CategoryMacro


DebugExample (last edited 2012-08-19 14:22:01 by dslb-088-066-126-172)