Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Saturday February 21, 2009 at 14:20
Rusty Fobe
Long Time Member
Joined:
Posts:
December 2008
47
I wonder if it is possible to get the statement line number from the prontoscript compiler.

Background:
I'm writing a debugger function that should replace the way I use System.print for debugging. Having to write something like:

System.print("thisVariable="+thisVariable+" "+thatVariable="+thatVariable)

several times becomes boring (well, at least if you make as many programming mistakes as I do ;-). In its simplest form I want to write trace(["thisVariable","thatVariable"]) or something likewise and get the same results. Fairly easy to obtain with eval. Actually that part of the function is already working.

In that function I would also like to get the possibility to print the line number, next to the message, or maybe just the line number. This would offer the possibility to trace the different branches a function should perform, without having to look each time in the bytecode tracing (which unfortunately repeats line numbers many times in its current state). Fullproof branch testing is one of the most difficult aspects of programming. Its easy to forget testing one of the branches.

If anyone is interested, I will make the trace function available as a utility for public use as soon as I get it working properly... with or without line number.

Regards, Rusty


Hosting Services by ipHouse