| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 415004Short introduction into debugging in GAP by Thomas Breuer and Max Neunhöffer1(see library file lib/debug.g)23Debug(<func> [,<name>]); # opens an editor to insert debugging code4# the debugged function is stored under a number56A "debugged" function gets a number and can later be accessed either as7itself or via this number.89Debug(<func_or_nr>); # opens an editor to edit debugging code10UnDebug(<func_or_nr>); # restores the function to its old form11ShowDebug(); # show currently debugged functions12SetDebugCount(<func_or_nr>,<count>); # Set counter of counting break point1314Keys in editor:1516F12 : this help17F2 : Set break point before current line18F3 : Set watch point before current line19F4 : Set counting break point before current line20F5 : Set Print statement before current line2122Put any other debugging code into the function.2324Note that the function object itself will be changed "in place"!25This means that all places where this function is installed for example26as a method will be changed simultanously.2728BEWARE of debugging functions that have been created within the scope29of another function possibly with access to the surrounding local30variables (see "Orbish" and friends)!31***Debugging of such functions does not work and might ruin them!***323334