Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Printing PowerBuilder execution stack

326 views
Skip to first unread message

Francisco

unread,
Feb 4, 2010, 8:02:34 AM2/4/10
to
Good morning!

I wonder if there is any way (PowerScript command) to print the stack
of objects and functions used in the execution of an application.
I have many calls from one function to map and thus would facilitate
much.

I searched the internet but I didn´t found no example of how to do
this.

Thank you very much!
Francisco

Jeremy Lakeman

unread,
Feb 4, 2010, 7:43:02 PM2/4/10
to

At runtime, no.
But if you profile the application, you can print out stack traces
based on any criteria you like.
You can turn profiling on and off any time you like with the Trace*
functions.
If you're not happy with PB's built in profile / trace GUI's, you'll
can write your own analysis process.

eg;

tracetree t
tracetreenode nodes[]
t.tracefilename='c:\trace.pbp'
t.buildmodel()
t.entrylist(nodes)

for i = lowerbound(nodes) to upperbound(nodes)
of_drill_in(nodes[i])
next

of_drill_in(tracetreenode n);
choose case n.activitytype
case ...


etc

We have a unit testing framework built into our application that turns
on tracing, runs an event, turns it off, then opens our own custom
profiling window.

Francisco

unread,
Feb 8, 2010, 8:46:16 AM2/8/10
to
Thanks a lot, Jeremy!
0 new messages