1. Scott Gorke
  2. PowerBuilder
  3. Wednesday, 9 October 2019 16:19 PM UTC

We are familiar with the debug tool in PB to use debug stops in code. But what if we did a build in PB and wanted to use "debug project"?

My counterpart is using an eval copy of  PB 2019 and when he builds our app, the "debug project" button is disabled. How can we enable it?

Also, does such a button exist in PB 12, and if so, how do we enable that? (If it doesn't exist in PB12, then so be it.)

Thanks,
Scott

Accepted Answer
Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Friday, 11 October 2019 08:34 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi Scott,

 

In Project Painter, there is a Debug Project button added in Toolbar since PB 11. It is mainly used by PB .NET application.

The Debug Project button will be enabled only if you create a PB .NET application as it is shown below:

 

 

 

 

 

 

 

 

You can refer to the first paragraph in the link below for details:

http://infocenter-archive.sybase.com/help/index.jsp?topic=/com.sybase.dc00586_1100/html/dplynet/BABEIADE.htm

 

 

Regards,

Ken

Comment
  1. Armeen Mazda @Appeon
  2. Friday, 11 October 2019 16:57 PM UTC
Hi Chris, Isn't this still needed to debug the legacy .NET SOAP services and assemblies for customers that still haven't upgraded their .NET code to SnapDevelop?
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 11 October 2019 19:46 PM UTC
Hi Armeen;

No ... the .Net Web Service (a la SOAP) can be debugged directly from the PB IDE like any Native PB App! You activate the WS Project debugging by using the RHMB => Debug. That in turn activates the PB Debugger where you set normal PowerScript break / watch points.The PB IDE then sends these to the .NET Framework "debugging tools" within the Web Browser to *corresponding* C# break points. The .Net debugger then invlokes the Web Service Test Harness (.Net Framework feature). From there, the PB IDE monitors the .NET Debugger when executing your related C# code in the test hardness running within the web browser. When you execute the WS from the PB IDE and the WS C# code gets to a break point sent by the IDE, the PB IDE automatically reasserts itself and shows you the related PowerScript line of code, variables, settings, etc. During a break point, you can set a new executable point, change variable data, add subtract break points, add/subtract watch points, etc in the PB IDE. All these debugging changes are then dynamically sent to the .NET debuggers so that when you press "Continue" in the PB IDE Debugger, that resumes the corresponding WS C# code execution with any PB debugger changes applied to the C#'s execution realm. This an "awesome" feature of the SOAP WS project & .Net framework integration that makes debugging totally transparent and seamless.

Regards ...Chris
  1. Helpful
  1. Scott Gorke
  2. Friday, 15 November 2019 19:55 PM UTC
Guys, sorry to reply so late, but that was the issue - our install and app are PB Classic, not PB .NET, Thanks for the input and advice.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 9 October 2019 16:42 PM UTC
  2. PowerBuilder
  3. # 1

Hi Scott;

  Both PB versions support the "Debug" mode via the Project Painter, as follows:

PB12.x...

PB2017/2019 ...

 

Note that the only difference in PB2017/2019 "project" is the extra information at the bottom of the General tab that gives you the commands to use with the new Appeon off-line compiler called the PBC.

HTH

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 10 October 2019 19:01 PM UTC
What toolbar are you referring to?
  1. Helpful
  1. Roland Smith
  2. Thursday, 10 October 2019 19:21 PM UTC
The Project Painter toolbar. There is a button that seems to always be disabled called 'Debug Project'. That is the main gist of the OP's question.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 10 October 2019 21:00 PM UTC
Ahhh yes ... its been that way for a long, long time! I just fired up my PB 11.5.1 IDE and it's *still* disabled there as well. I had noticed that way back even in the PB 8 IDE as well. I remember reporting it to Sybase but nothing was ever changed. Since Appeon inherited the code-line from PB 12.6 (same there too) - we still see this peculiar behaviour in PB 2017/2019 as well. It's been that way so long now - I just ignore it - LOL!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 10 October 2019 17:58 PM UTC
  2. PowerBuilder
  3. # 2

Is it correct that for applications build with PBD's the debug option is not necessary / has no extra effect? I heard somewhere that /pbdebug would still work.

 

Also, @Scott: Have you tried to run the PB ide "as administrator"?

From the windows file explorer: Have you tried to right click on your folder where the sourcecode is, choose "properties" and un-check the "readonly" property for all files and folders within?

Check if that way you're allowed to check the option.

 

HIH

Comment
  1. Miguel Leeuwe
  2. Friday, 11 October 2019 08:50 AM UTC
Hi Ken,

No the information is NOT correct. What's wrong about it is .... "in the PROJECT PAINTER" ... . In old pb versions yes, it was there, but now it's not. It's in the "System Options" window, "Profiling" tabpage.

Cheers.
  1. Helpful
  1. Ken Guo @Appeon
  2. Saturday, 12 October 2019 09:47 AM UTC
Hi Miguel,



If you open Project Painter in PB 12.6/2017/2019, you can also see the 'Trace Information' option under Machine code.



Regards,

Ken

  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 12 October 2019 10:49 AM UTC
Gosh ! Yes ... you're absolutely right Ken (I'm getting old and blind).
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 10 October 2019 20:52 PM UTC
  2. PowerBuilder
  3. # 3

I've had a look at an old pb 6.5.1 project painter (see attachment).

There they do show a checkbox for "trace information", like (still incorrectly) mentioned in current pb version's help, since it's no longer on the project painter. The modern help should be corrected to point to "System Options > Profiling tabpage" and not "Project painter".

See also the second attachment which shows the same information as nowadays, with the difference that in earlier pb versions the information was correct.

 

Attachments (2)
Comment
There are no comments made yet.
Scott Gorke Accepted Answer Pending Moderation
  1. Monday, 21 October 2019 21:01 PM UTC
  2. PowerBuilder
  3. # 4

Wow, a veritable cavalcade of discussion. Thanks guys!

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 22 October 2019 00:09 AM UTC
  2. PowerBuilder
  3. # 5

Since we are having a discussion about debugging, I have an example of undocumented PBVM functions that allow you to start pbdebug mode while your program is running.

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

 

Comment
  1. Miguel Leeuwe
  2. Tuesday, 22 October 2019 01:12 AM UTC
That's a great little tool Roland. Thank you, I'll build it in in our applications. One of the problems for running /pbdebug is that things "take forever" to only get to the point you intent to debug.

This is awesome!
  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.