# Debugger control reference

This appendix is a reference of the cross debugger or axd. The cross debugger is started with the `axd` command. All control commands are bound to the `axd` nameset.

break

The `axd:break`break command sets a breakpoint. Without argument a breakpoint is set in the current file at the current line. With a line number, the breakpoint is set in the current file. With two arguments, the first one is used as the file name and the second one is used as the line number.

axd:break axd:break "line" axd:break "file" "line"
(axd) axd:break "demo.als" 12 (axd) axd:break 25

The first example sets a breakpoint in the file demo.als at line 12. The second example sets a breakpoint in the current file at line 25. Without argument, the command sets the breakpoint at the current line. The current line can be seen with the `axd:info` command.

break-info

The `axd:break-info` control command reports some information about the current breakpoints.

axd:break-info
(axd) axd:break "demo.als" 12 (axd) axd:break "test.als" 18 (axd) axd:break-info Breakpoint 0 in file demo.als at line 12 Breakpoint 1 in file test.als at line 18

In this example, two breakpoints are set. One in file demo.als at line 12 and one in file test.als at line 18. The `axd:break-info` command reports the current breakpoint settings.

continue

The `axd:continue` control command resumes the program execution after a breakpoint. The program execution continues until a breakpoint or another terminating condition is reached.

axd:continue
(axd) axd:run Breakpoint 0 in file demo.als at line 12 (axd) axd:continue

In this example, the program is run and stopped at breakpoint 0. The `axd:continue` command resumes the program execution.

exit

The `axd:exit` command terminates a debugger session. This command is similar to the `axd:quit` command.

axd:exit
(axd) axd:exit
info

The `axd:info` command reports some debugger information. Such information includes the debugger version, the operating system, the primary input file, the primary input file source and more.

axd:info
(axd) axd:info debugger version : .. os name : linux os type : unix initial file : 0501 form file name : 0501.als form line number : 17 verbose mode : true max line display : 10 defined breakpoints : 0
list

The `axd:list` command display the form listing starting at the current session line number. The current form line number can also be seen with the `axd:info` command. The number of line is a debugger parameter. The first line to display can also be set as the first parameter. A file name can also be set.

axd:list axd:list "line" axd:list "file" "line"
(axd) axd:list (axd) axd:list 20 (axd) axd:list "file.als" 20

The first example shows the listing at the current debugger line. The second example starts the listing at line 20. The third example starts at line 20 with file file.als.

load

The `axd:load` command sets the initial or default file to be used with the `axd:run` control command.

axd:load "file"
(axd) axd:load "demo.als"

In this example, the file demo.als is set as the primary file. Using the `axd:info` command will report at which line, the first available form has been found.

next

The `axd:next` command executes the next line in the source file. The `axd:next` command does not take argument.

axd:next
(axd) axd:next
quit

The `axd:quit` command terminates a debugger session. This command is similar to the `axd:exit` command.

axd:quit
(axd) axd:quit
run

The `axd:run` command executes the default file in the slave interpreter. Without argument, the initial or default file is executed. The `axd:load` command can be used to set the initial file. With one argument, the file name argument is used as the initial file.

axd:run axd:run "file"
(axd) axd:run (axd) axd:run "demo.als"

The first example runs the initial file. The second example sets the initial file as demo.als and run it.