• view scoped values with non string keys

    By Fero Kossuth 1 decade ago

    Debug toolbar fails in case you want to show scoped variables and any "key" value is not string. Scopes are maps and key object need not to be string.

    For example:

    viewScope(1, "crash");

    will set scope variable with key 1 (number).

     

    If you wonder what usecase is it needed for - let's say you use index variable of any repeating control as key. Of course, there is workaround:

    viewScope("" + 1, "crash");