| Target Language Compiler |
 |
TLC Debugger Commands
The TLC debugger supports the following commands. You can abbreviate any TLC debugger command to its shortest unique form (use help command from within the TLC debugger for more info).
Table 6-1: TLC Debugger Commands
Command
|
Description
|
assign variable=value
|
Change a variable in the running program.
|
break <"filename":line|error|warning|trace>
|
Set a breakpoint.
|
clear breakpoint#
|
Remove a breakpoint.
|
continue
|
Continue from a breakpoint.
|
down [n]
|
Move down the stack.
|
help [command]
|
Obtain help for a command.
|
list start[,end]
|
List lines from the file from start to end.
|
next
|
Single step without going into functions.
|
print expression
|
Print the value of a TLC expression. To print a record, you must specify a fully qualified "scope" such as CompiledModel.System[0].Block[0].
|
quit
|
Quit the TLC debugger.
|
status
|
Display a list of active breakpoints.
|
step
|
Step into.
|
stop <"filename":line|error|warning|trace>
|
Set a breakpoint (same as break).
|
up [n]
|
Move up the stack.
|
where
|
Show the currently active execution chains.
|
which name
|
Looks up the name and displays what scope it comes from.
|
whos [::|expression]
|
Lists the variables in the given scope.
|
To view the complete list of TLC debugger commands, type help at the TLC-DEBUG> prompt.
Usage Notes
When using break or stop, use:
-1 to break on error
-2 to break on warning
-3 to break on trace
For example, if you need to break in gain.tlc on error, use
TLC_DEBUG> break "gain.tlc":-1
When using clear, get the status of breakpoints using status and clear specific breakpoints. For example,
TLC-DEBUG> break "gain.tlc":46
TLC-DEBUG> break "gain.tlc":25
TLC-DEBUG> status
Breakpoints:
[0] break File: gain.tlc Line: 46
[1] break File: gain.tlc Line: 25
TLC-DEBUG> clear 1
In this example, clear 1 clears the second breakpoint.
| Tips for Debugging TLC Code | | Example TLC Debugging Session |  |