The Schwartzenegger of Debuggers
The Schwartzenegger of Debuggers

For those of you who use our On-Rev hosting service, you may be aware that we used to provide a client to help you upload and debug LiveCode scripts. During our server move this client was temporarily lost. Since then restoring it has been the top request in hosting support - and I'm extremely pleased to be able to tell you today...

 

The On-Rev client is back!

 

You can now log in again, using the client, and upload and debug your Livecode files. If you don't already have a copy of the client you can download it here:

 

For Mac

http://www.on-rev.com/templates/onrev/files/onrevosx.dmg
For Windows:

http://www.on-rev.com/templates/onrev/files/onrevwindows.exe

 

 

If you've never used the on-rev client, here is a really basic walkthrough of its features.

Log in

Log in

Enter your hosting account username (1) and your account password (2). Click Login.

Create a test file

Create a test file

Select the site you want to work with from the drop down menu, (1). Create a file in your "Local Files" tab by clicking the tiny + icon in the bottom left corner (2). I've named mine "test.lc". Enter a script into the main panel (3). I've entered a "Hello World" script with great originality:

<html>
  <head>
    <title>Hello World, server style</title>
  </head>
  
  <body>
  <?lc
    put "Hello World!"
  ?>
  </body>
</html>

Save and upload

Save and upload

Click the small green arrow in the top right to save your file and upload it to the server.

Check it works

Check it works

Click the "Debug" button, circled above, and see "Hello World" appear in your browser.

Find an error

Find an error

If I introduce a deliberate error into the script, I can now see it happen on the server. I added the word "surprise" to my script, then clicked the little save and upload arrow (you must do this, or you will be debugging the perfectly fine saved version on the server). Now click "Debug" and you will get a handy error message complete with line numbers:

file "/home/lainopik/public_html/testfolder/test.lc"
  row 8, col 9: script: not a command (Hello World!)

Breakpoints

Breakpoints

 

So far so good. But now the real magic begins.

 

**Health Warning** This next bit ONLY WORKS WITH IREV TYPE FILES. You must switch the name of your file from .lc to .irev to use breakpoints, and use the tag within your script "? rev" not "? lc".

 

Obviously, this is a really short and simple piece of code, but if you have something long and knarly, you want to be able to stop and start the code, to figure out exactly where your error lies. With the on-rev client you can do this. Insert some breakpoints in your code:

<html>
  <head>
    <title>Hello World, server style</title>
  </head>
  <body>
  <?lc
    put "Hello World!"
    breakpoint
    put "Hello New World!" after breakpoint
  ?>
  </body>
</html>

Now cilck debug. Your output will now be only "Hello World!". Go back to your client window and you should see the row of buttons along the top of your client are now available. Click "Continue" and the script will complete, outputting

 

"Hello World!Hello New World! after breakpoint"

 

Neat, I'm sure you'll agree.

Bonus points for variables

Bonus points for variables

The panes below your script will show your variables for you. To see this, add a line to the test script:

<html>
  <head>
    <title>Hello World, server style</title>
  </head>
  <body>
  <?lc
    put "Hello World!"
    breakpoint
    put "Hello New World!" after breakpoint
    put "test" into tTestVariable
  ?>
  </body>
</html>

Click debug. Now click "Step Over" until you reach line 11. Hey presto, your variable appears in the lower pane.

 

We're really happy to restore this useful piece of software to your on-rev hosting service! Since it has been some time since this software has been up and running, if you find issues with it on the new servers please do report them via the on-rev support contact form, under "Bugs".

About The Author
David Williams
David Williams is Server Administrator for LiveCode and On-Rev.
Read David Williams Blog
Other Articles
Webcasting From San Diego
   22.08.2014
Watching a webcast is easy, but filming and streaming it for you without a hitch is hard! We're deep in preparations for RunRevLive.14 and our cameraman is losing sleep...
Read more
 
 
The Arnie of Debuggers
   22.08.2014
Yes, its true. The On-Rev Client is Back! Now you can debug your LiveCode Server scripts live on the server again, with this useful piece of software.
Read more
Community Moments
   22.08.2014
What do Bulgaria, Taiwan and Colombia have in common? They all contain keen livecoders creating neat stuff for you. Get your hands on some code and a brand new scheduling app here.
Read more
Multiplayer Game Online
   22.08.2014
This article is an overview of how a multiplayer game written in LiveCode works, and examines the specifics of handling the login process.
Read more
 
Thank you for your time.

 

© LiveCode 2014