Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Debugging

Debugging

Discuss OrbForms Designer and PocketC Architect

Postby FrankG on Tue Jan 28, 2003 8:28 pm

Is there any fancy way to bebug an OrbForms application? So far I've used the brute force approach by putting a bunch of Alerts through the areas of my code I want to test. It's been working well - especially with automatic loading to the emulator. I'm just wondering if I'm missing some way to trace or something like that.

Thanks,
FrankG
FrankG
 
Posts: 210
Joined: Thu Jan 23, 2003 7:58 pm

Postby sangahm on Fri Feb 02, 2007 2:22 pm

It's been a while since this was posted, and no one has replied. I'm wondering if everyone only uses the alerts for watching the code operation, as well as some other things available such as assertions, debug logging, debug code blocks, and runtime functions.

These seem to be very limited in terms of stepping through code, watching variables, etc. that other environments have.
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby FrankG on Fri Feb 02, 2007 4:22 pm

I guess no one replied beacause application debugging isn't really all that difficult... I must have been having a tough time with whatever I was debugging a the time. I should take more advantage of assertions,
debug logging, and debug only code blocks than I do! :oops:

Frank
FrankG
 
Posts: 210
Joined: Thu Jan 23, 2003 7:58 pm

Postby sangahm on Fri Feb 02, 2007 5:38 pm

Agreed that it's not hard, but it can get very tedious especially having to click through many alerts when watching loops, in/out functions, or other frequently changing variables.

I also noticed that when modal forms are up, it keeps alerts from coming up (I guess as it should; but irritating nevertheless).
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby jobie on Sat Feb 03, 2007 1:29 am

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">
I also noticed that when modal forms are up, it keeps alerts from coming up (I guess as it should; but irritating nevertheless).
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Definitely make use of the <b>debuglog</b> function. It's basically what we old school C programmers usually call "<i>printf debugging</i>", but it's better than clicking through alerts, especially if you're monitoring variables in a loop.

Of course, the downside there is you must be running on an emulator...but you should probably be doing that anyway until you're ready to test on hardware.

-John
jobie
 
Posts: 23
Joined: Wed Dec 27, 2006 8:53 pm
Location: USA

Postby sangahm on Sat Feb 03, 2007 1:52 am

I'll have to give it a try...I just thought it would be more trouble since it wasn't "real-time." It takes a different way of thinking about the process.

I always do run on the emulator/simulator first anyway, so that shouldn't be an issue.
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby kda406 on Tue Mar 20, 2007 11:15 am

I must have missed this thread earlier. My apps can rarely be debugged in the emulator; I usually have to debug on a real device. My apps make generous use of modal UIs, plus alerts can keep time critical communications from working, so my use of alerts is limited.

Instead I have a simple modal I created that has a scroll bar, an 11 line field text area, a clear button, and a close button. I copy this modal to each app I'm developing. From the home page of a given app, I'll have a resource that will open this modal. When opened, the modal displays the contents of the global string gnLog. gnLog is cleared on application start.

Anywhere I need to dump any kind of data "print style" debugging info, I append it to gnLog. For example I might put in "way" points to indicate which direction the application proceeded through the conditional processing. When the modal is opened and gnLog is viewed, it might look like:
Code: Select all
Opened communications
Requested ver from destination
Got 1.2, okay
Initiated database transfer manually

by simply constructing the string like:
Code: Select all
gnLog = gnLog + "Initiated database transfer manually\n";

All this assumes your code is stable enough to run crash free. If it is crash free, you can do <whatever> and then go back and review the "print style" log later. Very long logs can slow the processing down a little bit, but I have never crashed a PDA with the global string log file itself. I have had this kind of log work for hundreds, and perhaps even in the low thousands of lines of print style debug dumping. It has been quite effective for me.

I hope this helps you all.
Kyle
kda406
 
Posts: 86
Joined: Wed Sep 10, 2003 1:24 pm
Location: Atlanta, GA, USA

Postby sangahm on Tue Mar 20, 2007 12:01 pm

Very nice. I'll have to try that next time around.

My last app had a few conditionals that was rather complicated for me to determine the input & result. I ended up using a debug log and that helped me zero in on where the logic was failing. I now use this for debugging, but I can see where your modal gnlog would work too.
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby FrankG on Tue Mar 20, 2007 11:40 pm

Kyle,

Great idea!

Thank you,
Frank
FrankG
 
Posts: 210
Joined: Thu Jan 23, 2003 7:58 pm


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 3 guests

cron