• That's a good idea - I guess you could add a new macro - ASSERT_AND_PRINT(jsvGetLocks(var) < JSV_LOCK_MAX, jsvGetRef(var)) or something, that would print the second arg if it failed.

    jsvGetRef is really what you need. Then you can look it up in the memory trace that should be printed after the assertion... Trying to work out the variable name is possible by scanning all variables, but a huge faff and I don't think there is any built-in function for it.

    Otherwise the easiest way is if you have a debugger, or can reproduce it on the PC.

    (Just going to move this to ESP8266 - I don't think it's really JS related... not in the way most folks will be expecting :) )

About

Avatar for Gordon @Gordon started