Since TclOO is now part of Tcl since 8.6, I expected Komodo to support being able to debug the objects it creates. Given a simple example:
oo::class create cls {
constructor {} {
variable bar "hello world"
}
method foo {} {
variable bar
puts $bar
}
}
cls create oExample
oExample foo
When I set a breakpoint on the last line, run and look for the values in the Debug tab, I cannot see any variables or namespaces called oExample. When I look under Global, I see there is an oo namespace, and underneath it, namespaces Obj1, Obj2… Obj12. All are empty except Obj12, which contains a string for $bar containing “hello world”.
Replacing the last two lines with:
cls create oExample1
cls create oExample2
oExample1 foo
oExample2 foo
… assigns Obj12 and Obj13 namespaces $bar string variables with the values “hello world”.
Having to guess which instantiation of any object gets assigned to which generically named namespace (Obj12… etc) is awkward. What is the proper way to debug/inspect TclOO obects with Komodo? (I am using 8.5 at the moment)