|
Speaker: Michelle Petersen
Step through and over functions as you debug.
|
Welcome to Aptana. My name is Michelle, and I'm going to be demonstrating basic
debugger functionality, so just stepping into, stepping over and returning from
stepping for a function while you're debugging, and I'm also going to show you how
to suspend on a page load.
So to start, I'm going to start debugging this HTML page that I have open that
has some JavaScript in it. I'll click the "Debug" button. It watches the page
with the debugger, Firefox, and to start, I'm going to actually suspend the current
thread, and I can do that by clicking the left-hand icon down here in the corner
and choosing "Suspend," and now, I'm going to click "Start test."
It's telling me that the launch is configured to open the debug perspective when
the thread suspends, and do I wanna open this perspective now. Yes, I do. As you
can see, we have two different perspectives. There's the default Aptana perspective
and there's the debug perspective. Since we're debugging, we'll wanna use the debug
perspective.
Now, if I go up to the "debug you" here, I have buttons that can step into and
step over a function. So we're going to step into the function, and we're going
to step through it a bit just to see what's going on. So this takes me right into
the function, where I've suspended the thread. I can continue to click this, and
it'll just take me through the function.
I can click "Step over," and it steps out of the function into another function,
and when I'm done with this, I can click this "Step return," and that'll take me back
to the beginning. So that's how basic stepping works, and if I wanna terminate this,
I can just click the "Terminate" button.
So now, I'm going to show you another option. If you wanna suspend on a page
load, that's a preference that you can configure. So if I go up to "Window" >
"Preferences," and check "Suspend at start," and then click "Okay," now, when I
click the "Debug" button, it'll automatically suspend for me when that page loads,
and it'll take me right back into the debugger.
That concludes this screencast. Thank you.
[End of Video]
|