PowerBuilder Code Inspection Tutorial

How to Inspect PowerBuilder Code?

  1. Enable Code Inspection
    • Right-click on the VE Ribbon menu and select 'Customize Ribbon'

      Select Customize Ribbon

    • In the window below, check the box 'Beta Features'

      PB Code Inspection Beta Features

    • A new tab 'Beta Features' appears in the Ribbon: Open it.
    • Click on Enable/Disable Code Rule: the button is toggled to Yellow.
      Code Inspection features are now enabled.

      Enable/Disable Code Rules

    • Run your code analysis again, to check your code against inspection rules.

     

  2. When the Code Analysis is completed, a new section 'Code Inspection' is displayed in the Visual Expert treeview.
    The languages supported are listed at the root of the treeview.
    For each language, the number of rules available is indicated:

    Code Inspection Rules for PowerBuilder

    Select a language, for instance: 'Code Inspection for PowerBuilder'.

  3. Choose a macro to select the issues you’re interested in:

    Select issues for PB code inspection

  4. The corresponding rules are listed in the treeview.
    For each rule, the number of issues found is indicated as shown below.

    Code Inspection for PowerBuilder

  5. On selecting a rule: a documentation page appears with details.

    Code Inspection Rule Description for PB

  6. In the navigation bar, click on 'Issues found':
    Each object with this particular issue is listed in a container hierarchy.

    Security Issues in PowerBuilder Applications

  7. On selecting an object from this list: Issues are highlighted in the code

    Highlight issues in your code

  8. You can then open this script directly in the PB IDE to fix the issue.

    Open Scripts in PB IDE to fix issue

 

Visual Expert 2020, PowerBuilder, Code Inspection