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

Login:
Pass:
 
 

Topic:
ProntoScript Debugging Tips
This thread has 9 replies. Displaying all posts.
Post 1 made on Sunday September 2, 2007 at 04:44
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,009
There's an undocumented function that may help to prevent script developers from having to put System.print('myDebugMessage') in your code.

If you have debug active, you may want to use:

System.setDebugMask(4);

which acts like a script trace cause script lines that are executed to be written to the _PS_DEBUG_ widget (from what I can tell, this output is from a hook that Javascript provides to show the current execution unit).

Keep in mind that the above statement will slow performance. So, in a released module, you should always ensure to:

System.setDebugMask(0);

to ensure that only what your module print with System.print('myDebugMessage'); is shown.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 2 made on Monday November 19, 2007 at 04:18
Centaur
Long Time Member
Joined:
Posts:
January 2005
26
In the TCPIPDemo from Barry Gordon (besides Flanagan's book "Javascript, the definitive guide" without doubt our best Pronto programming guide ;-) ) I also saw:
System.setDebugMask(9);

So this leads me to thinking that the parameter can be any value from 0 - 9.
Could somebody explain the use of all (or at least the '9') these parameter values?
Post 3 made on Monday November 19, 2007 at 10:51
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
There are differenet values, and Philips uses some of them for special internal debugging. Maybe someday Philips will release the information to the general public. I have asked them to, but so far they have been hesitant to do so. I stumbled across "9" and figured out what to do with it and Philips then gave me the final info under NDA. Sorry Centaur, I can not but I will ask Philips again.
OP | Post 4 made on Monday November 19, 2007 at 11:18
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,009
Centaur,

As the function name implies, this value is a mask and not a 0-9 value.

The only details Barry and I are at liberty to share (due to NDA) are those available for general use on the device. The only value that you or others can utilize at this point and time is the one I posted above. It does indeed cause lots of information to be dumped to your _PS_DEBUG_ panel and may or may not prove useful.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 5 made on Monday November 19, 2007 at 14:00
Centaur
Long Time Member
Joined:
Posts:
January 2005
26
Lyndel, Barry, thank you for your reply.
Although I do not understand why Philips does not want to share this kind of information...

And indeed I should have recognised the "mask" in the method name :-0

Note: one of the reasons for my question was because I saw this 'System.setDebugMask(9);' in the TCPIPDemo and I did/do not understand what it is doing. And because I did not got any debug info in my panel (proved to be a javascript typo made by me in a tag name) I was wondering if this statement could be the reason.
Post 6 made on Tuesday November 20, 2007 at 12:56
fen
Long Time Member
Joined:
Posts:
September 2005
24
in conjunction with a tcp/ip demo i wouldn't be too surprised if mask 9 redirects the debug output to some predefined network address or maybe broadcast the thing thorugh the net - i will try this :-D
Post 7 made on Tuesday November 20, 2007 at 13:09
fen
Long Time Member
Joined:
Posts:
September 2005
24
well - nice idea, but no :)
Post 8 made on Tuesday November 20, 2007 at 13:44
MVis
Long Time Member
Joined:
Posts:
July 2007
94
I have used the setDebugMask and _PS_DEBUG_ but I don't remember seeing any info in it other than my System.print() statements. Is there other information other than System.print() that is displayed?

EDIT :
My apologies - I was using 0x1001 and not 0x0100
Thanks for the correction. That's much more obviously useful.

Last edited by MVis on November 20, 2007 15:20.
OP | Post 9 made on Tuesday November 20, 2007 at 14:14
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,009
On November 20, 2007 at 13:44, MVis said...
I have used the setDebugMask and _PS_DEBUG_ but I don't
remember seeing any info in it other than my System.print()
statements. Is there other information other than System.print()
that is displayed?

MVis, obviously you have not tried the mask specified when I opened this thread.

The only mask value that will be noticeable by users is 4.

Last edited by Lyndel McGee on November 20, 2007 14:28.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 10 made on Tuesday November 20, 2007 at 14:29
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,009
All, I've asked Daniel to either lock or remove this thread. There is nothing more we can comment on regarding this topic.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Jump to


Protected Feature Thread Closed
This thread has been locked. Replies are not allowed at this time.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse