/*! \page Debugging
../../doc/gcad_doxygen/Debugging.dox

<pre>
\ref Debug-settings-tools
\ref Debug-functions
\ref Debug-core-function
</pre>





________________________________________________________________________
\section Debug-settings-tools
\code

Activate debug-switch in deb.mak with: DEB = 1
 - results in deb.umak with: CPDEB = -DDEB

Check debug-switch (startup-message "Debug-switch DDEB is ON|OFF")



//----------------------------------------------------------
AP_debug__  ("func xy");   // stop in debugger and display message

// stop in debugger with keycode  Alt shift x



//----------------------------------------------------------
// using -DDEB

#ifdef DEB
..
#endif



//----------------------------------------------------------
// Write into file <tempDir>/debug.dat:
// (not active if -DDEB is not ON)

AP_deb_stat (1);           // open debugfile

  printd ..                // print into debugfile

AP_deb_stat (0);           // close debugfile





\endcode
________________________________________________________________________
\section Debug-functions
\code


#include "../xa/xa.h"                  // printd

  // start debugging (following prints -> debug-file)
  AP_deb_stat (1);


  // print into debug-file
  printd (" debugfile = %sdebug.dat\n",OS_get_tmp_dir());


  // block of debug-messages
#ifdef DEB
    for(i1=0;i1<i1; ++i1)
      printd("tab[%d]=%d\n",i1,ia[i1]);
#endif


  // stop debugging (following prints -> console)
  AP_deb_stat (0);

  printd (" this text will be skipped ..\n");

  // check debugfile: vi ~/gCAD3D/tmp/debug.dat



  AP_debug__ ("func xx");  // stop in debugmode;
                           // must start with "gdb gCAD3D.exe -x gCAD3D.gdb"




\endcode
________________________________________________________________________
\section Debug-core-function
<pre>
- only for Linux, not MS-Win
- start gcad with parameter "testdll"
  - this sets AP_stat.tstDllStat to value 1
  - <bindir>/testdll.so     will be loaded
- all funcs in dll will be loaded.
- BUT CANNOT close,recompile,reOpen this dll !!
</pre>


\code
Variables:
  AP_stat.tstDllStat  // 0=normal (OFF); 1=testdll_ON

Functions:
  AP_testdll__        // recompile / reload testdll.so DOES NOT WORK !

Files:
  ../APP/testdll.c
  ../APP/testdll.mak

\endcode
*/
