{"id":26,"date":"2005-10-28T20:49:11","date_gmt":"2005-10-29T01:49:11","guid":{"rendered":"http:\/\/www.juixe.com\/techknow\/?p=26"},"modified":"2005-10-28T20:49:11","modified_gmt":"2005-10-29T01:49:11","slug":"hard-to-debug","status":"publish","type":"post","link":"http:\/\/juixe.com\/techknow\/index.php\/2005\/10\/28\/hard-to-debug\/","title":{"rendered":"Hard To Debug"},"content":{"rendered":"<p>Whenever I start debugging the struts based web application I am working on the server freezes.  I am using JBoss\/Tomcat&nbsp;with Struts 1.1 and Eclipse 3.1.  Since I can&#8217;t fire up the debugger, mark breakpoints, and set expressions I fell back to the tried and tested &#8216;printf method of debugging&#8217;.  I call it &#8216;printf&#8217; because I learned to debug this way back in my C programming days in college.  Since I couldn&#8217;t fire up the debugger and examine the strack trace I throw my own debugging exceptions and print out the last few lines method calls in the stack.<\/p>\n<pre>    try {\n        \/\/ TODO: Remove\/debug\n        throw new Exception(\"DEBUG EXCEPTION\");\n    }catch (Exception ex) {\n        Object[] stack = ex.getStackTrace();\n        for(int i=0; i &lt; 4; i++) {\n            System.out.println(stack[i]);\n        }\n    }\n<\/pre>\n<p>I should probably look more deeply into why the server freezes when I start up the debugger.  On the other hand, I have managed to come up with a work around to get the job done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whenever I start debugging the struts based web application I am working on the server freezes. I am using JBoss\/Tomcat&nbsp;with Struts 1.1 and Eclipse 3.1. Since I can&#8217;t fire up the debugger, mark breakpoints, and set expressions I fell back to the tried and tested &#8216;printf method of debugging&#8217;. I call it &#8216;printf&#8217; because I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[14,15,3],"tags":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p902K-q","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/26"}],"collection":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":0,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"wp:attachment":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}