Solved

Running a PB application in debug mode

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

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. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

808 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