Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
DEBUG - The Maple debugger breakpoint function
Calling Sequence
DEBUG(arg1, arg2,...)
Parameters
argN
-
(optional) any expression
Description
The DEBUG function has the effect of a breakpoint in Maple code. When the DEBUG function is executed, execution stops before the next statement executed, and the debugger function is invoked. If the debugger function returns anything other than NULL, the returned value is evaluated, and the debugger function is reinvoked.
The stopat function (and the stopat debugger command) set breakpoints by inserting a call to the DEBUG function before the statement at which the breakpoint is set. Such breakpoints can be removed using the unstopat function (or the unstopat debugger command).
A breakpoint can be inserted explicitly into the source code of a Maple procedure by inserting a call to the DEBUG function. Such breakpoints cannot be removed using the unstopat function (or the unstopat debugger command).
If the DEBUG function is passed any parameters, they are passed on to the debugger function for display when it is invoked. If no parameters are passed, the result of the previous computation is passed to the debugger function instead.
The DEBUG function returns NULL so as not to affect %, %%, and %%%. Therefore, inserting it as the last statement of a procedure will hide the return value of the procedure. It is not possible to use stopat to set a breakpoint after the last statement in a procedure.
Thread Safety
The DEBUG command is thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.
Examples
Note: These examples illustrate the use of these debugger commands in Maple's command-line interface. In the standard (graphical) interface, the debugger runs in its own window, with controls for most of the common commands. See Interactive Maple Debugger for details.
f := proc(x,y) local a; a := x^2; DEBUG(); a := y^2; DEBUG(`Hello`); a := (x+y)^2 end proc:
4
f:
3 a := y^2;
DBG> cont
Hello
5 a := (x+y)^2;
See Also
% ditto operator, debugger, Interactive Maple Debugger, showstat, stopat, stoperror, stopwhen, stopwhenif
Download Help Document