I don't know how to debug...

Moderators: LCNeil, heatherlaine, kevinmiller, elanorb

Post Reply
jpyck
Posts: 8
Joined: Tue Mar 11, 2014 5:12 pm

I don't know how to debug...

Post by jpyck » Mon Mar 31, 2014 4:30 pm

I'm not sure if this is OK, but I've attached a file that needs debugging. Can anybody tell me how to debug this code.
It's my version of lesson 3 and there are two issues I can't resolve.
1) On the cards "contactDetails" and "contactNew", the title always reverts to "Contacts" in the Title group.
(this is probably a MobGui problem)
2) The "save" or "databaseAddRecord" code does not work.
I've spent too much time trying to figure this out, and I'm sure it's a simple fix, I just can't see it...
I am very green and could use some help in debugging. i.e. how can we step through the code and see if an array gets populated etc.

Thanks,
Jack
Attachments
SummerSchoolApp.zip
(178.37 KiB) Downloaded 43 times

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 851
Joined: Wed Jun 24, 2009 1:17 pm
Location: Plymouth, UK
Contact:

Re: I don't know how to debug...

Post by dave.kilroy » Mon Mar 31, 2014 5:48 pm

Hi jpyck

Debugging is a really important skill - and writing code without this skill is a bit like Russian Roulette - you code works or BANG! you're dead. If you can debug you can take the bullet out of the pistol and carry on coding...

I suggest stop trying to complete lesson 3 and spend a bit of time reading Devin's most excellent introduction to debugging http://revolution.byu.edu/debug/Debugging.php

once you 'get it' you'll be able to breeze through whatever the bugs are in your lesson 3 script - as well as your future work.

Really - completing lesson 3 is not important, learning to debug is important - have fun! :)

Kind regards
"...this is not the code you are looking for..."

Bobisback
Posts: 15
Joined: Wed Mar 12, 2014 6:07 pm

Re: I don't know how to debug...

Post by Bobisback » Tue Apr 01, 2014 4:11 pm

Good stuff. Thanks for the post!!

newtronsols
Posts: 192
Joined: Tue Mar 11, 2014 12:57 pm

Re: I don't know how to debug...

Post by newtronsols » Fri Apr 11, 2014 8:19 am

The issues I've found I chase around the most is where you 'believe' functionality works on say version 6.5.2 but actually it only works on version 6.6 - for example email attachments. Or with mobgui - you build with the old version - but realise you should have built for Android with the new mobgui (or standard Livecode) - otherwise some functionality that works when you test it on iOS/Windows may not work on Android.

Post Reply

Return to “idea2app and Coding School”