Is there a way to do profile tracing (not pbdebug) with the PB executable?
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- How to enable profile tracing with PB exe?
- Paul Shue
- PowerBuilder
- Tuesday, 25 July 2023 22:03 PM UTC
- Friday, 15 September 2023 18:13 PM UTC
- PowerBuilder
- # Permalink
- Wednesday, 26 July 2023 01:50 AM UTC
- PowerBuilder
- # 1
Hi, Paul -
This may help:
https://docs.appeon.com/pb2021/pbug/Tracing_and_Profiling_Applications.html#ug94233
Best regards, John
- Wednesday, 26 July 2023 01:53 AM UTC
- PowerBuilder
- # 2
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
- Wednesday, 26 July 2023 17:57 PM UTC
- PowerBuilder
- # 3
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
- Wednesday, 26 July 2023 18:13 PM UTC
- PowerBuilder
- # 4
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
- Chris Pollach @Appeon
- Wednesday, 26 July 2023 18:31 PM UTC
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.
-
Helpful Loading... Helpful 1
- Wednesday, 26 July 2023 18:47 PM UTC
- PowerBuilder
- # 5
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.
- Friday, 15 September 2023 12:56 PM UTC
- PowerBuilder
- # 6
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?
- John Fauss
- Friday, 15 September 2023 14:15 PM UTC
-
Helpful Loading... Helpful 0
- Friday, 15 September 2023 14:24 PM UTC
- PowerBuilder
- # 7
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?
- Friday, 15 September 2023 14:45 PM UTC
- PowerBuilder
- # 8
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:
I hope this is what you are looking for.
Best regards, John
- Friday, 15 September 2023 16:38 PM UTC
- PowerBuilder
- # 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?
- Paul Shue
- Friday, 15 September 2023 18:13 PM UTC
-
Helpful Loading... Helpful 0
- Page :
- 1
However, you are not allowed to reply to this question.