?
Solved

Running a PB application in debug mode

Posted on 2004-09-16
5
Medium Priority
?
1,372 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 33

Assisted Solution

by:sajuks
sajuks earned 100 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 100 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

765 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