Using the Debugger / Looking at the Run Log
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
Now, I can show and hide this area, which is the stack frame display and I can also show the run log and the run log shows me what is happening at a high level as the program is executing. I can now continue the simulation and you can see that it's just saying it's continuing, it's stopping, not very much is being shown there but I could do something else if I wanted to and I'm going to come back here and add an alert statement. Now, this is plain old JavaScript code and what I'm going to do is to run the app in the simulator and you can see that's the beginning and end of the previous run. Now this one and notice that what happens is with an alert I get the value shown here, the text that I created in my alert, that string and I put in a value which happens to be the value of the parameter that was passed in. If I'm not running it from Dashcode, if I'm running it on my iPhone, I can see those values. It's a very good, fairly high-level way of seeing what's going on. You don't need a debugger. Just put this line of code in. It says here's where I am and what the value is. The message can be anything that you want but it is a good way of finding out what's going on and it shows up in the run log. I can click OK and I'm back here and so I've got it in the log. If I want to go back I don't have to scribble things down to find out what's going on. So these are a couple of the ways in which you can use the debugging facilities in Dashcode. You can use first of all the high level. You can check your data sources as they are built. Then inside the debugger you can look at the break points, you can stop and look at the stack frame. It's only available when it's running. You can look at the run log here and as this grows, it's not going to be cleared out until you ask to clear it out here. So this is a small collection of debugging tools but they're the major ones that can help you solve a lot of the problems that are going to occur; the misplaced commas and colons, the errors in the transformations and if all else fails, the alerts that you just put in to see what's happening that let you actually see what's going on as you are running the app on your iPhone.
Tutorial Information
| Course: | Developing iPhone Web Apps |
| Author: | Jesse Feiler |
| SKU: | 34075 |
| ISBN: | 1-935320-89-0 |
| Release Date: | 2009-12-31 |
| Duration: | 8 hrs / 103 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 