For debugging I want to serialize javascript objects with JSON.stringify(myobject). But this gives:
TypeError: Converting circular structure to JSON <
TypeError: Converting circular structure to JSON
You can use console.log() and the chrome javascript debug console, which will happily let you inspect your object even if it has cyclic references.