1. Paul Shue
  2. PowerBuilder
  3. Tuesday, 25 July 2023 22:03 PM UTC

Is there a way to do profile tracing (not pbdebug) with the PB executable?


Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Friday, 15 September 2023 18:13 PM UTC
  2. PowerBuilder
  3. # Permalink
I found the following information in the PB documentation in less than a minute, so I'm puzzled why you cannot do the same... ?? https://docs.appeon.com/pb2022r2/pbug/ug38398.html#d0e59050
Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 26 July 2023 18:47 PM UTC
  2. PowerBuilder
  3. # 1

I have an example of how to activate /PBDEBUG in your code so you can have it active only where needed.

https://www.topwizprogramming.com/freecode_pbdebug.html

Make sure to change the dll name in the external function declarations. It uses undocumented PBVM functions.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 26 July 2023 01:50 AM UTC
  2. PowerBuilder
  3. # 2

Hi, Paul - 

This may help:

    https://docs.appeon.com/pb2021/pbug/Tracing_and_Profiling_Applications.html#ug94233

Best regards, John

Comment
There are no comments made yet.
Mark Goldsmith Accepted Answer Pending Moderation
  1. Wednesday, 26 July 2023 01:53 AM UTC
  2. PowerBuilder
  3. # 3

Hi Paul,

Have a look at these 2 links for more info on tracing as the /pbdebug option, as explained, is just one approach:
https://docs.appeon.com/pb2019/pbug/ch33s08.html
https://docs.appeon.com/pb2019/pbug/ch32s05.html

As well, John Strano provided an excellent session at Elevate 2021 on this very subject: https://www.youtube.com/watch?v=LwqytkvDkUg

HTH...regards,

Mark

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 26 July 2023 17:57 PM UTC
  2. PowerBuilder
  3. # 4

Hi Paul;

  Mark's links should provide you with a good overview of how to create a Profiling Feature for any PB App!

  FYI: My STD framework has that all built-in and it can also show you how your app looks like from the MS-Windows Monitoring, Display O/S / App memory conditions, alert you GDI issues, build a Process Model, etc all in real time and right within your PB App! 

Example1:

Example2:

FYI:  http://chrispollach.blogspot.com/2023/03/framework.html

The framework is free & open source to use but also, feel free to help yourself to any interesting code that you might find.  ;-)

Note: the framework also includes the ability to Start or Stop the PBDEBUG tracing in the VM under program control!  <=

Regards ... Chris

 

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 15 September 2023 14:45 PM UTC
  2. PowerBuilder
  3. # 5

I found this documentation via a web search for the terms "w_starttrace powerbuilder profiling":

    https://docs.appeon.com/pb2019/pbug/ch32s02.html

A little ways down (just past the "Using a Window" sub-heading), is a mention of some sample code. Since I have not watched the Elevate 2021 session in question, I don't know if this is the same window you are looking for... However, the URL in the aforementioned documentation now only takes you to the PowerBuilder section of CodeXchange.

Fortunately, doing a search for "PB Code Profiling" from that web page in CodeXchange found this:

    https://community.appeon.com/index.php/codexchange/searchcode?query=PB%20code%20profiler&searchdate=all&childforums=1&catids=4&start=180

I hope this is what you are looking for.

Best regards, John

Comment
There are no comments made yet.
Paul Shue Accepted Answer Pending Moderation
  1. Wednesday, 26 July 2023 18:13 PM UTC
  2. PowerBuilder
  3. # 6

Thanks for the replies. Is there a way to do profile tracing without adding code to an existing exe similar to pbdebug?  I was hoping there was some kind of parameter similar starting your app from the command line like: application.exe /pbdebug

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 26 July 2023 18:31 PM UTC
No ... The /PBDEBUG is the only command line option.

Unfortunately with that you cannot control when it starts the trace, what object(s) it traces or what tracing options it will use. So the output is gigantic.
  1. Helpful 1
There are no comments made yet.
Paul Shue Accepted Answer Pending Moderation
  1. Friday, 15 September 2023 12:56 PM UTC
  2. PowerBuilder
  3. # 7

Does anyone know if the profiler trace window/code (done by John Strano provided  at Elevate 2021: https://www.youtube.com/watch?) is available to use and if so where?

Comment
  1. John Fauss
  2. Friday, 15 September 2023 14:15 PM UTC
If Mr. Strano does not respond here to your question, Paul, I suggest you reach out to him. His LinkedIn and Facebook information was posted in that Elevate 2021 session at approximately 1:30 from the start.
  1. Helpful
There are no comments made yet.
Paul Shue Accepted Answer Pending Moderation
  1. Friday, 15 September 2023 14:24 PM UTC
  2. PowerBuilder
  3. # 8

Thanks -  I saw that but was hoping that John Strano's sample profile trace window code was available somewhere. If not it mentions that the window w_starttrace is available from an old sybase link which is no longer there. Is that somewhere that can be downloaded and ready to roll?

Comment
There are no comments made yet.
Paul Shue Accepted Answer Pending Moderation
  1. Friday, 15 September 2023 16:38 PM UTC
  2. PowerBuilder
  3. # 9

Thanks John - I am looking at that now. One additional question - after a profile trace file (.pbp) has been created, I know how to view the contents in PowerBuilder - is there a way that file can be viewed by using PB code in my application?

Comment
  1. Paul Shue
  2. Friday, 15 September 2023 18:13 PM UTC
I could and I did. The profile window from John's youtube video is much more robust and has all the bells and whistles so why reinvent the wheel? That said I took your earlier link and downloaded the sample app and was able to create a basic log fairly quickly. Thanks again for all your efforts.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.