stuffradio Posted April 4, 2008 Share Posted April 4, 2008 In my Java class we're supposed to step through the code by hand and write the output of the text in order that it is executed. Got any tips for doing this quickly and efficiently? Quote Link to comment https://forums.phpfreaks.com/topic/99477-stepping-through-code-by-hand-tips/ Share on other sites More sharing options...
Daniel0 Posted April 4, 2008 Share Posted April 4, 2008 That's what debuggers do, so just use one of them. They'll allow you to set breakpoints in an application/script where execution will then pause and you can view the contents of the variables. Quote Link to comment https://forums.phpfreaks.com/topic/99477-stepping-through-code-by-hand-tips/#findComment-509022 Share on other sites More sharing options...
steelmanronald06 Posted April 4, 2008 Share Posted April 4, 2008 For example, Eclipse. You make a breakpoint at line 3, and click the bug. It shows an alternate window in which there is another button called Step Over. Click it and it will execute just line three. Click again and it will execute line 4. Keep clickign and you'll work down as far as you want...plus it shows what was executed at each line. Quote Link to comment https://forums.phpfreaks.com/topic/99477-stepping-through-code-by-hand-tips/#findComment-509293 Share on other sites More sharing options...
Barand Posted April 5, 2008 Share Posted April 5, 2008 In my Java class we're supposed to step through the code by hand and write the output of the text in order that it is executed. A good discipline. That's exactly what should be going on your head when you are writing the code. Quote Link to comment https://forums.phpfreaks.com/topic/99477-stepping-through-code-by-hand-tips/#findComment-509674 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.