Hello,
as per the subject, how do I inspect the fields of my application in the browser console?
I suspects they're somewhere under rtl. but the autocompletion didn't help me.
Bye

Mailing lists / pas2js / 2022-09
8 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello,
as per the subject, how do I inspect the fields of my application in the browser console?
I suspects they're somewhere under rtl. but the autocompletion didn't help me.
Bye
Hello, as per the subject, how do I inspect the fields of my application in the browser console?
Do you mean, how to write all properties of an object to the browser console?
Or to inspect fields in the browser debugger?
I suspects they're somewhere under rtl. but the autocompletion didn't help me.
Mattias
El 21/9/22 a les 14:06, Mattias Gaertner via Pas2js ha escrit:
The latter. When I put a breakpoint inside a procedure, I can only see local variables.
Bye
El 21/9/22 a les 17:08, Luca Olivetti via Pas2js ha escrit:
So, is it possible or not to inspect fields defined in my TBrowserApplication?
Bye
It is possible.
I assume, your program contains a
var
Application: TBrowserApplication;For example in Chrome when paused on a breakpoint look at the right side under Watch and Breakpoints there is Scope.
Under Scope there is Local and Closure. The Application should be there. Depends on where your breakpoint is.
Mattias
El 23/9/22 a les 12:37, Mattias Gaertner via Pas2js ha escrit:
Ahh, thank you! Now that I'm looking for it I found it in firefox (it was out of view since the area was small and there's no scrollbar until you hover over the panel, so I thought there were no more subpanels). I can inspect all the fields from there, but still I cannot find a way to show them from the console prompt (i.e. when you write a variable in the console and see its value).
Bye
I usually use simply
uses js;
Writeln(TJSJSON.stringify(yourvalue));you can also do
uses web;
console.debug(yourvalue);The effect is usually more or less the same.
Michael.
El 23/9/22 a les 18:20, Michael Van Canneyt ha escrit:
That's the old writeln trick, but you need to instrument the program to do that.
I mean how do I inspect the variables in the javascript debugger without previous instrumentation.
I now know I can do that using the "scopes" panel, but I wanted to know how I can see them in the javascript console.
By trial and error I just found that I can see them under
$mod.Application
Bye