Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Wiki Markup
{alias:cmdtrace}

Name

cmdtrace — Control tcl command tracing

...

You may wish to trace commands only at a given level. A level refers to the level of nested scope in which a command is executed. A toplevel command, executed outside any proc and namespaces, belong to level 1. Commands called from a level 1 command will have level 2, etc.

Arguments

on level

Enables command tracing. The default level is 0, meaning all levels are traced. If you specify a level only commands lower or equal to that level will be traced.

off

Disables command tracing.

maxblockcount count

How many lines to keep in the command log window. The default value is 2000.

Examples

The following example show commands at level 1 and level 2.

...

No Format
bgColor#eeeeee
borderWidth1

namespace eval myspace {
	variable x 1
}

proc myproc {} {
	puts hello
}

puts "I'm a toplevel command"
myproc

...

No Format
bgColor#eeeeee
borderWidth1

1:namespace eval myspace {
	variable x 1
}
2:variable x 1
1:proc myproc {} {
	puts hello
}
1:puts "I'm a toplevel command"
1:myproc
2:puts hello