{"id":161,"date":"2010-10-05T17:54:47","date_gmt":"2010-10-06T00:54:47","guid":{"rendered":"http:\/\/blogs.unsw.edu.au\/comp1400\/?p=161"},"modified":"2010-10-05T17:54:47","modified_gmt":"2010-10-06T00:54:47","slug":"tut-11-source-debugger","status":"publish","type":"post","link":"https:\/\/blogs.unsw.edu.au\/comp1400\/blog\/2010\/10\/tut-11-source-debugger\/","title":{"rendered":"Tut 11 &#8211; Source debugger"},"content":{"rendered":"<p>I have arranged for Unity 3 to be installed on the CHI Lab Macs. It includes the debugger that I demonstrated in the lecture. We&#8217;ll use it to step through some code.<\/p>\n<ul>\n<li>Download the <a href=\"http:\/\/www.cse.unsw.edu.au\/~cs1400\/labs\/wk11\/GrowFlowers.js\">GrowFlowers.js<\/a> script from the lecture.<\/li>\n<li>Create a project to run it in. Remember to save the scene.<\/li>\n<li>Set Preferences to use MonoDevelop as your editor (<a href=\"http:\/\/unity3d.com\/support\/documentation\/Manual\/HOWTO-MonoDevelop.html\">instructions<\/a>)<\/li>\n<li>Sync your project.<\/li>\n<li>Read the <a href=\"http:\/\/unity3d.com\/support\/documentation\/Manual\/Debugger.html\">debugger instructions<\/a>.<\/li>\n<li>Open GrowFlowers.js in MonoDevelop.<\/li>\n<li>Set breakpoints on the line 9 and 23.<\/li>\n<li>Start the debugger with <strong>Run &gt; Debug<\/strong><\/li>\n<li>In the new Unity window, open the saved scene and press play.<\/li>\n<li>The debugger should return showing line 9 highlighted.<\/li>\n<li>Use the <strong>Step Over<\/strong> button to step through the code.<\/li>\n<li>When you get to the end of the Start method, press the <strong>Continue<\/strong> button.<\/li>\n<li>The debugger will run for a while and then stop at line 23.<\/li>\n<li>Use the <strong>Step Over<\/strong> button to step through the code.<\/li>\n<li>Watch the values change in the <strong>Locals<\/strong> window.<\/li>\n<li>When you get to the end of the Update method, press the <strong>Continue<\/strong> button.<\/li>\n<\/ul>\n<p>Try this out with different initial values in the heights array to see what happens.<\/p>\n<p>Change the code to make the flowers shrink, starting with the tallest flower. Try running your code in the debugger to see what it does.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have arranged for Unity 3 to be installed on the CHI Lab Macs. It includes the debugger that I demonstrated in the lecture. We&#8217;ll use it to step through some code. Download the GrowFlowers.js script from the lecture. Create a project to run it in. Remember to save the scene. Set Preferences to use [&hellip;]<\/p>\n","protected":false},"author":80,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[630],"tags":[],"class_list":["post-161","post","type-post","status-publish","format-standard","hentry","category-lab"],"_links":{"self":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts\/161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/users\/80"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/comments?post=161"}],"version-history":[{"count":1,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts\/161\/revisions"}],"predecessor-version":[{"id":162,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/posts\/161\/revisions\/162"}],"wp:attachment":[{"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/media?parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/categories?post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.unsw.edu.au\/comp1400\/wp-json\/wp\/v2\/tags?post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}