Solved

Running a PB application in debug mode

Posted on 2004-09-16
5
1,308 Views
Last Modified: 2013-12-26
Hi guys.
My question is:
Is there any other switch to use when debugging an PB executable besides the PBdebug switch? I'm finding that the file.dbg created is too long. I needed to write a short script to filter it for just the business objects interactions I'm interested in. This file dumps everything the GUI, business and data layers do.
Is this a wish list or /pbdebug is the only switch I can use?

Cheers;

Capacho
0
Comment
Question by:Capacho
  • 3
5 Comments
 
LVL 33

Assisted Solution

by:sajuks
sajuks earned 50 total points
ID: 12081170
Have you tried using the DebugBreak ( ) function ?
Usage
Insert a call to the DebugBreak function into a script at a point at which you want to suspend execution and examine the application. Then enable just-in-time debugging and run the application in the development environment.
When PowerBuilder encounters the DebugBreak function, the Debug window opens showing the current context.

Remember to enable the PBDebug tracing from the system options.
0
 

Author Comment

by:Capacho
ID: 12083768
Unfortunately this would be incredibly slow and not very useful.
I meant to say that the application is a filename.exe which was built using PB7. Now my question is still the same. Run the executable from NT 4 in debug mode and see if there's any other switch I can use to somehow filter the debug file for example to eliminate such entries as PFCs instantiation, calls to GUI activate, microhelp, etc. In other words, I would like to write to the debug file only those lines that have to do with business objects. Ex. n_cst_obj_business_name.of_function_name etc.
This can be accomplished by either a macro or a script that filters some known strings out of the debug file. (The debug file grows to about 20 Mbytes) and the application has about 2400 objects.
Id does sound to me like I need to write a program but it is always the "Time" issue.

Thanks.
0
 
LVL 8

Accepted Solution

by:
Vikas_Dixit earned 50 total points
ID: 12091880
Have you tries the PB profiling/trace.. ??
There is an example in the PB profiling hel on how you can add small code in your app. This is very googd and does not  take much space or slow down the application. Also, there are tool available in the  Tools section to view the trace info in different views ( class view, routine view and trace view ).

Please refr this link for some info on the same. Also see PB help for profiling :

http://www.astercity.net/~azakrze3/html/profiling.html
http://www.pbugg.de/docs/heys_tracing_and_profiling_m1.ppt.

Regards,
Vikas
0
 

Author Comment

by:Capacho
ID: 12111392
Unfortunately all of these approaches are well known to us so I believe the solution is just to write a script to trap the business object interactions as the .exe runs from the command line.

Thank you guys for your pointers. I still need some other approach if any before I finish with this question.
0
 

Author Comment

by:Capacho
ID: 12191719
Although The above approaches are correct, they did not answer my question directly. I splitted the points because I think these guys have the PB knowledge required to suggesdt them.

Thank you again.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now