{"id":63,"date":"2004-12-22T09:53:35","date_gmt":"2004-12-22T14:53:35","guid":{"rendered":"http:\/\/www.ericfeminella.com\/blog\/?p=63"},"modified":"2023-01-03T10:47:46","modified_gmt":"2023-01-03T15:47:46","slug":"ajax-debugger-version-10","status":"publish","type":"post","link":"https:\/\/www.ericfeminella.com\/blog\/2004\/12\/22\/ajax-debugger-version-10\/","title":{"rendered":"AJAX Debugger beta 2.0"},"content":{"rendered":"<p>Recently, I wrote a simple AJAX debugger which can be useful in the debugging of complex types such as Objects, Arrays, JSON etc. <\/p>\n<p>The AJAX Debugger traces out all inherited and &#8220;own&#8221; properties of user defined Object instances, properties\/values of an Object, indexes of an Array, etc. &#8211; to a <code>div<\/code> with an <code>id<\/code> of &#8220;console&#8221; within an application.<\/p>\n<p>To use the AJAX Debugger, simply include <em>debugger.js<\/em> in your application during development and create a <code>div<\/code> on the page with an <code>id<\/code> of &#8220;console&#8221; to serve as an output panel (I plan to implement the creation of the console <code>div<\/code> automatically in the next release).<\/p>\n<p>To log output to the console, use the debugger&#8217;s <code>trace<\/code> function:<\/p>\n<pre lang=\"js\">\r\n\/\/ whereas the first param is an object of any type to trace \r\n\/\/ and the second param instructs the debugger to recursively \r\n\/\/ trace out the object or not.\r\ntrace (object, true);\r\n<\/pre>\n<pre lang=\"js\">\r\ntrace({\r\n   'name': 'AJAX Debugger',\r\n   'build': 1.0\r\n}, true);\r\n\r\n\/\/ Outputs the following to the \"console\" div:\r\n\/\/ Found instance of type : Object\r\n\/\/ .name = AJAX Debugger\r\n\/\/ .build = 1\r\n<\/pre>\n<p>An upgrade to version 1.0 will be made within the next few weeks, allowing for the ability to launch the console in a separate window independent of the application itself.<\/p>\n<p>An example of can be found<br \/>\n<a href=\"http:\/\/code.ericfeminella.com\/articles\/archives\/2005\/ajax-debugger-beta-2\/debugger.html\" target=\"_blank\" rel=\"noopener\">here<\/a><\/p>\n<p>The AJAX Debugger can be downloaded<br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/articles\/archives\/2005\/ajax-debugger-beta-2.zip\" rel=\"noopener\">here<\/a>.<\/p>\n<p>Feel free to email me with your thoughts and \/ or ideas to make the Debugger better.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I wrote a simple AJAX debugger which can be useful in the debugging of complex types such as Objects, Arrays, JSON etc. The AJAX Debugger traces out all inherited and &#8220;own&#8221; properties of user defined Object instances, properties\/values of an Object, indexes of an Array, etc. &#8211; to a div with an id of &#8220;console&#8221; within an application. To&#8230; <a class=\"read-more\" href=\"https:\/\/www.ericfeminella.com\/blog\/2004\/12\/22\/ajax-debugger-version-10\/\">Continue Reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[42,133,78,9],"tags":[],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-apis","category-browsers","category-javascript-2","category-news"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":0,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}