Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
LiveCode Mobile Development Beginner's Guide (2nd Edition)

You're reading from   LiveCode Mobile Development Beginner's Guide (2nd Edition) Create interactive mobile apps for Android and iOS with LiveCode

Arrow left icon
Product type Paperback
Published in May 2015
Publisher
ISBN-13 9781849699655
Length 256 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Colin Holgate Colin Holgate
Author Profile Icon Colin Holgate
Colin Holgate
Joel W Gerdeen Joel W Gerdeen
Author Profile Icon Joel W Gerdeen
Joel W Gerdeen
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. LiveCode Fundamentals FREE CHAPTER 2. Getting Started with LiveCode Mobile 3. Building User Interfaces 4. Using Remote Data and Media 5. Making a Jigsaw Puzzle Application 6. Making a Reminder Application 7. Deploying to Your Device A. Extending LiveCode Index

Debugging

If you went ahead and tried out the calculator before we entered all the scripts it needed, you most likely will have seen the script debugging in action. Hopefully, you've managed to cope with what you saw, it can be overwhelming at first. This is what it would have looked like:

Debugging

Most of what you see here is the same that you'll see when you edit scripts, but if you do see the debug variation, you are actually in a paused state, which is a freeze frame of the program as it runs. In this example, the program stopped because line 46 is looking for a field named dis play. There isn't such a field, as it should be display.

The error message at the bottom of the panel makes it clear that the error has something to do with the field name and you can quickly spot the typo. Sometimes though, you may need to inspect the variables to make sure they contain the values you think they should, for example, the Variables tab will show a list of those values.

An unexpected problem is one time that you may see the debugger, but when developing a script, you are able to set breakpoints by clicking in the column just to the left of the line number you want to halt the program at.

Once the script is halted by a breakpoint, you can use the row of buttons at the top to step through the code. The content displayed as you hover the cursor above a button, is it's meaning. These buttons are:

  • Continue: This will set the script that runs again
  • Stop: This stops the script from running and switches to the editor, so that you can make changes
  • Show next statement: This will show an indicator to the left of the current line
  • Step into next statement: This is used for stepping into a different handler
  • Step over next statement: This is used to go onto the next statement in the current handler without stepping in a handler mentioned on the current line
  • Step out of current handler: This is used to skip the remaining lines in a handler that you had previously stepped into and to exit to the handler that called the current one

You will become familiar with the script editor and debugger as you go along, but that should get you started!

In this chapter, we covered just enough to make you familiar with the environment so that you can practice using some controls and to do a little script writing. There is quite a lot to LiveCode as a tool, so you may be interested to look into other topics or go into more depth than is covered here.

A good starting point would be LiveCode's own set of online tutorials, which are located at http://lessons.runrev.com/.

Type in the search box, words that describe your area of interest and you will see a list of articles on that topic.

You have been reading a chapter from
LiveCode Mobile Development Beginner's Guide (2nd Edition)
Published in: May 2015
Publisher:
ISBN-13: 9781849699655
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime