Debugger commands
- Breakpoints:
-
break delete bcond[ition] breakpoints breaksub
- Model execution:
-
cont next step finish model
- Output:
-
display undisplay list print info exportprob lsattr lslibs lslocal lsmods lssymb
- Stack access:
-
up down where
- Interpreter options:
-
option
- Termination:
-
quit
Example: Simple debugging sequence
mosel debug debugexpl.mos Start Mosel debugger break 20 Set breakpoint at line 20 cont Execute up to the breakpoint print D Print out symbol 'D' cont Continue model execution info Arr Information about model object 'Arr' (e.g. size) lsmods Display model info (e.g. memory usage) quit Quit the debugger
Example: Debugging a submodel
mosel debug debugmaster.mos Start Mosel debugger breaksub 1 Stop at start of submodels cont Execute up to the breakpoint break 25 debugsub.mos Set breakpoint in the submodel display SNumbers Display watch on object 'SNumbers' cont Execute up to the breakpoint break 31 debugsub.mos Another submodel breakpoint bcond 2-2 SNumbers.size < 10 Condition on 2nd submodel breakpoint cont Execute up to the breakpoint 2-2 quit Quit the debugger