Can you review this? It makes it so your swf10 backtraces can be inspected and legible. Try causing a runtime error and then do .getStackTrace() on the error object. If you inspect the abbreviated string, it prints out nicely.
Change 20091124-ptw-p by [email protected] on 2009-11-24 19:18:55 EST in /Users/ptw/OpenLaszlo/trunk-2 for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Learn how to inspect long strings again Bugs Fixed: LPP-8635 Debug.inspect lost the ability to expand abbreviated strings Technical Reviewer: hminsky (pending) Overview: Rename the __String parameters `pretty` and `unique` to what they really do: `escape` (i.e., make non-printing characters in strings show up) and `readable` (i.e., if you can't return a representation that eval would say is === to the original, use the stylized debug representation <<type #uid | description>> to indicate so). Details: swf9stubs, LzMessage, LzDebug.{js,as}, LzFormatter: Update parameter names. LzDebug: Update parameter names and documentation for __String and __StringDescription. Change the return contract of __StringDescription to say whether or not the representation created is 'readable' or not. Be more accurate about what is readable. For string-like, only escaped, primitive strings that have not been truncated qualify. Remove a lot of hairy inspection that was trying (but incorrectly) computing readable. Don't enter non-objects into the circular reference table. Make the decision as to when to used "unreadable" representations sane. When inspecting non-objects, turn off length limit, escape, and readable, so you see the full content. Tests: Create a program that causes a runtime error, e.g.: (function (x) { return x.foo })(3); Run in swf10. Inspect the error. In the Debugger, evaluate _.getStackTrace() You will get an abbreviated string like: «string(1838)| ReferenceError: Error #1069: P?» Inspect that, and you should see the expanded string, which is the backtrace from the runtime: lzx> Debug.inspect(«string(1838)| ReferenceError: Error #1069: P?») ReferenceError: Error #1069: Property foo not found on Number and there is no default value. at <anonymous>()[/usr/local/tomcat/jakarta-tomcat-5.0.30/temp/lzswf9/Users/ptw/OpenLaszlo/trunk-2/test/build/ptw/$lzc$class_$2Fcanvas$2Fa.as:69] at $lzc$class_$2Fcanvas$2Fa/foo()[/usr/local/tomcat/jakarta-tomcat-5.0.30/temp/lzswf9/Users/ptw/OpenLaszlo/trunk-2/test/build/ptw/$lzc$class_$2Fcanvas$2Fa.as:82] [...] Files: M WEB-INF/lps/lfc/debugger/swf9stubs.lzs M WEB-INF/lps/lfc/debugger/LzMessage.lzs M WEB-INF/lps/lfc/debugger/LzDebug.lzs M WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js M WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as M WEB-INF/lps/lfc/compiler/LzFormatter.lzs Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20091124-ptw-p.tar _______________________________________________ Laszlo-reviews mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
