Solved

Running a PB application in debug mode

Posted on 2004-09-16
5
1,321 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What is an NDK ? 3 98
Custom ckeditor using builder 10 99
Aptana 3.6 Preview Problem On Mac 35 124
Re-running SolarQube failed. “Unable to create root temp directory” 6 96
In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

813 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