{"id":200,"date":"2007-09-12T10:18:04","date_gmt":"2007-09-12T10:18:04","guid":{"rendered":"http:\/\/www.mjtnet.com\/blog\/2007\/09\/12\/debug-debug-debug\/"},"modified":"2007-09-12T10:18:04","modified_gmt":"2007-09-12T10:18:04","slug":"debug-debug-debug","status":"publish","type":"post","link":"https:\/\/www.mjtnet.com\/blog\/2007\/09\/12\/debug-debug-debug\/","title":{"rendered":"Debug, Debug, Debug"},"content":{"rendered":"<p>Many support requests and forum posts I see include a script snippet and a statement like &#8220;this value is wrong&#8221; or &#8220;the if statement says false but it should be true&#8221;.  So we make an intelligent guess and say &#8220;so perhaps the value you are comparing isn&#8217;t what you think it is.  Use the debugger&#8221;.<\/p>\n<p>Stepping through the debugger reveals answers to problems like this quickly.  Another way of checking values is to use a diagnostic message box.  Whack a line like this into the script:<\/p>\n<p>MessageModal>%MyVariable%<\/p>\n<p>And see if MyVariable is what you are expecting.<\/p>\n<p>Here&#8217;s an article I wrote some time ago on how to use the debugger.<\/p>\n<p><a href=\"http:\/\/www.mjtnet.com\/blog\/2006\/05\/17\/use-the-debugger\/\">http:\/\/www.mjtnet.com\/blog\/2006\/05\/17\/use-the-debugger\/<\/a><\/p>\n<p>Use it.  Debug.  Debug.  Debug.  Please.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many support requests and forum posts I see include a script snippet and a statement like &#8220;this value is wrong&#8221; or &#8220;the if statement says false but it should be true&#8221;. So we make an intelligent guess and say &#8220;so perhaps the value you are comparing isn&#8217;t what you think it is. Use the debugger&#8221;. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/200"}],"collection":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/comments?post=200"}],"version-history":[{"count":0,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/200\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/media?parent=200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/categories?post=200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/tags?post=200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}