LiveCode Mobile

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
RedDeupree
Posts: 15
Joined: Sat Jul 18, 2015 5:11 pm

LiveCode Mobile

Post by RedDeupree » Tue Jul 28, 2015 7:58 pm

Is there any version in the pipeline that will run itself on iOS or Android to allow live debugging of code between

if the environment is "mobile" then
-- blah
-- I want to debug this and step through logic that is not actually platform independent at the script level.
-- blah
end if

?

MaxV
Posts: 1574
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: LiveCode Mobile

Post by MaxV » Wed Aug 26, 2015 11:54 am

Just use this:
########CODE#######
on errorDialog pErrore
if environment() = "mobile" then
answer "Errore " & the system date &" - "& the time &CR& pErrore
end if
pass errorDialog
end errorDialog
#####END OF CODE#####

See ErrorDialog in the dictionary
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

rinzwind
Posts: 131
Joined: Tue May 01, 2012 10:44 am

Re: LiveCode Mobile

Post by rinzwind » Thu Aug 27, 2015 11:57 am

I would go for the console out mode. put "test" forwards it to the console (visible in the simulator cmd+/ or for the real device in the device view in xCode (somewhat hidden beneath a small button over there). Real time debugging isn't going to happen I think.

Some log command like:

Code: Select all

command logmsg pmsg, ptype
   local tmsg
   if ptype is empty then
      put "console" into ptype
   end if
   put formatDate(the seconds) & tab & pmsg & cr into tmsg
   switch ptype
      case "console"
         if the environment is "development" then
            put tmsg after msg
         else
            put tmsg
         end if
         break
      case "file"
         put tmsg after url("file:" & the effective filename of this stack & ".log")
         break
      case "dialog"
         answer tmsg
         break
   end switch
end logmsg

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5104
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: LiveCode Mobile

Post by jacque » Thu Aug 27, 2015 7:02 pm

There is no live debugging available on mobile, you can only track errors or log progress for anything you set up. There are different ways to do that from very simple "answer" dialogs to more complex logging to stdout. I have a web page with my notes from a conference talk I did a while ago which explains the more comprehensive (but less simple) console method: http://www.hyperactivesw.com/resources_ ... gging.html
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Feature Requests”