• Q1: Why does the refrence value change and what is that value exactly?

    It's because Espruino uses fixed-size blocks - it's the block number: http://www.espruino.com/Internals#variabĀ­le-storage

    Q2: Wht is the meaning of 'r0' and 'l1' and compared to 'r1' and 'l2' ?

    Espruino's vars are reference counted for quick garbage collection. R = number of references (from other JS vars), L = number of locks (eg. bits of Espruino internal code that have a pointer to it).

    Q3: What is the 'name' attribute refereing to?

    The name of the field inside the object you just inspected.

    "\xFFcod" is the name of the attribute of a function that contains a function's code. You can probably just search in your code for console.log( \"JsVars Last:\ to figure out which function it is.

    Q4: What are the return values here as they don't seem to be the actual blocks as returned in a trace request?

    However ["\xFFcod"] is just an array containing the String "\xFFcod" which is why E.getSizeOf isn't returning what you expect. You need to do whaverFunctionYouTraced["\xFFcod"] instead

    Q5: How to get the value #531 and it's contents using trace() ?

    Look down the hierarchy of the trace (eg, the lines above) to figure out what the function was, then you can write the code to reference it. If you paste the whole trace up I could show you.

    But the issue here is you've got a very large function that's been uploaded. As above just searching your code for console.log( \"JsVars Last:\ will likely tell you what function that is.

About

Avatar for Gordon @Gordon started