1. Olan Knight
  2. PowerBuilder
  3. Wednesday, 14 July 2021 20:46 PM UTC

Update:  The call is apparently asynchronous.

After hitting ENTER as described below, the application finally started about 6.4 minutes later!
I entered my credentials into the app and hit LOGIN.
2 minutes later the application frame was built.
9 minutes after THAT, I'm still waiting for the main interface (a treeview) to be displayed.

After a total od 37 minutes waiting for the main interface to be displayed, I closed the app. That level of performance makes the entire thing useless.

After closing the app, the ".dbg" file appeared in the same folder as the EXE.
Note that the ".dbg" file did not appear at once, it's STILL being populated minutes after the app was closed. Which tells me the entire trace was done in memory rather than being written to as it occurred. No wonder the bloody thing performed so poorly.


Either I'm doing something incorrectly OR the /pbdebug option is simply useless.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PBv12.1, build 7055
Window 10, 64 bit platform
Oracle 12C database


Is it possible to TRACE a runtime EXE?

The documentation says you can do so from a CMD PROMPT:
           C:\Personal\Testing> EXEFILE.exe /pbdebug

The problem is that when I run the code in this manner, the call just passes through, and the app never starts:


The next to last line was my command: I entered the string, hit ENTER, and the next line of output was displayed two seconds later.


Any thoughts?

 

 

Accepted Answer
Arthur Hefti Accepted Answer Pending Moderation
  1. Thursday, 15 July 2021 03:44 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi

a couple of thoughts about the usage of PBDEBUG

- You can add the debug option to your application like Roland suggested. I added a key combination to start it this way anywhere in the application. The drawback is that the debug files are less readable than /PBDEBUG. 

- /PBDEBUG opens the debug file, writes the line executed and closed the file. For each access of the debug file the anti virus tool scans the file. This causes the performance issue.

- Switch of the virus scanner for the .dbg files or in general while creating a debug file.

- Debugging from the IDE and the command line with /PBDEBUG works fine.

- The .dbg file is located in the same folder as the exe, unless you run if in a location where the user running the exe has no rights to write a file. Then you find it in %localappdata%\VirtualStore\<FolderName>

- For your problem with creating the .dbf file with the exe. Do you check the command line somehow? /PBDEBUG is part of the command line.

- The dbg file can be analysed very easily with the PBLPeeper tool by Therry (Techno-Kitten)

Regards
Arthur

Comment
  1. Andreas Mykonios
  2. Thursday, 15 July 2021 10:29 AM UTC
I agree with the comment about PBLPeeper. What makes me anxious is that Terry Voth isn’t participating to these forum and he maybe stopped using PB. Of course I hope he is well.

Andreas.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 15 July 2021 14:30 PM UTC
The last I heard (not sure if this is true) ... Terry was selling health products on the internet. Definitely, his website domain is gone. I did see him logged into the Elevate conference last year though.
  1. Helpful
  1. Benjamin Gaesslein
  2. Monday, 26 July 2021 07:40 AM UTC
Ah, so the virus scanner is responsible for the excrutiatingly slow /PBDEBUG. That's bad news for everyone whose virus scanner is mandated and managed by their employer, I guess.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 15 July 2021 14:59 PM UTC
  2. PowerBuilder
  3. # 1

Hi Olan;

  Have  a look at my OrderEntry demo App from the STD framework, as it can do dynamic tracing (more than just what the PB documentation states) and dynamic PBPcreation. The framework can also view the PBP information in real-time ...

Not listed in PB documentation ...

Dynamic Profiling ...

Trace/Profile Viewing ...

Model (real-time) view ...

 

Let me know if you need help as to where to look for the code to run the above features. You are most welcome to use this code in your App(s) as the framework is free and open source.

Regards ... Chris

Comment
  1. Olan Knight
  2. Thursday, 15 July 2021 15:06 PM UTC
That's wonderful, Chris! Thank you very much!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 15 July 2021 18:32 PM UTC
PFC ... "eat your heart out" - LOL! ;-)
  1. Helpful
  1. Chris Pollach @Appeon
  2. Tuesday, 20 July 2021 18:32 PM UTC
Hi Everyone;

I just uploaded today a new version of the PB2019 R3 Order Entry App that has a fix within the framework to handle real-time modelling without crashing. The fix prevents a crash from happening and was due to the fact that I added code to make a DC/DS more memory efficient (about 20%) when disposing of DWO resources. However, this caught my "Build Model" code where there was no useful DWO in the DS when constructing the model. Hence the crash. The fix was easy as I just had to over-ride the destructor event in order to process the Build Model code first and then call the "more efficient (LOL)" ancestor code. ;-)

Last night, I also uploaded a new OrderEntry App for PB/PS2021 beta that also has the above fix included for R3 plus some more GUI improvements in the model display DWOs.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 15 July 2021 01:01 AM UTC
  2. PowerBuilder
  3. # 2

This example allows you to turn on/off dbtrace on the fly.

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

 

Comment
  1. Olan Knight
  2. Thursday, 15 July 2021 15:09 PM UTC
Thank you, Roland! I implement this and it makes the trace file FAR more useful, and I'm not waiting for 45 minutes for the main interface to be painted in the app!
  1. Helpful
  1. Olan Knight
  2. Thursday, 15 July 2021 15:10 PM UTC
By the way, that's a sweet implementation! :)

  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.