6) You can also access all these objects (without code complete) on the Run JS tab

...by typing the javascript to invoke on the TextArea and clicking on Apply

7) Another powerful feature is the 'Watch’ which will monitor the value contents of a particular HTML Element.

For example this is how we can monitor the Search TextBox (note Watching label in red)

...and now every time we enter a new value on the textbox we will get an trace message:

Note if you want just the trace viewer to open automatically everytime TeamMentor’s main UI loads up, you can set the window.TM.Debug.show_TraceView value to true:

Tracing events execution
Ok, so now that we have this trace window open up, what can we do with it?

As mentioned above, the jscalltracer.js is also part of TeamMentor, and after a couple
customizations, it is set-up to add hooks on the main TM Methods invocations (including TM Events)

To see this in action , in the ‘debug div’ click on the Setup Trace Hooks link

...after about 20sec (depending on your box)

... you should see a number of ‘hooking ...' messages in the Trace Output:

If you now do any UI action (like for example clicking on a View), you will see an number of ‘event’ messages show up (note how they are shown in a Tree-like-format, which represent the call depth)

More examples of call traces:

1) events that fire when I clicked on the ‘remove filter’ button

2) event that fire when I clicked on an Article in the main Table:

3) events that fire when I clicked on one of the metadata filters (in this case the Apache technology):

Finally, if you are debugging something that happens when TeamMentor loads up for the first time, you want to change the callTrace_LoadEnvironment and callTrace_LoadEnvironment_Before_Gui values

...to true

... so that you get all events

...including the first main javascript call that triggers the rebuild of the entire GUI (if you set callTrace_LoadEnvironment_Before_Gui to false, the first call captured occurs after the main GUI is loaded)