Debugging your Web target – PB Docs 80

Debugging your Web target

The basic process for debugging involves setting breakpoints
and stepping through your code. This summary procedure shows the
shortcut keys for debugging actions.

For information on configuring your Web target for debugging,
see “Enabling debugging for your
deployment configuration”
.
For information on setting breakpoints, see “Setting breakpoints”.

proc.gif To debug your Web target:

  1. Set one or more breakpoints (F9)
    in a script you want to debug.

    Open any page in the target and set breakpoints in the script
    editor.

  2. Select and debug your Web target from the PowerBuilder Run
    menu or the target popup menu.

    You can also start a debugging session with a debug icon in
    the toolbar.

    The start page you specified on the Run/Debug page
    of the Target Properties dialog box displays in the browser.

  3. In the browser, take actions so that you arrive
    at a breakpoint. Focus returns to the editor where you can examine
    variables, the call stack, and the script.

    You can navigate to other pages. Do not edit pages while at
    a breakpoint.

  4. Step through code (F8 and F10),
    set more breakpoints (F9), and examine variables.

  5. Continue executing the script (F5).
    Focus returns to the browser.

  6. Repeat from step 3 until you want to end debugging
    (Shift+F5).

Stepping through code

When
you arrive at a breakpoint, you can step to subsequent lines of
code, one by one. Use one of the Step commands, either with a function
key or a button on the Debug toolbar:

To When Select this command
Step to the
next line
The current
line is not a function
Either Step In (F8)
or Step Over (F10)
Step line by
line through a function
The current
line is a function
Step In (F8)
Execute a function and step
directly to the next line in the current script
The current line is a function Step Over (F10)

proc.gif To stop single-stepping and continue to the next
breakpoint:

  1. Select Continue from the Debug menu.

    or

    Press F5.

Focus returns to the browser, and you can take actions on
the page that lead you to the next breakpoint.

Keystroke reference for debugging

The following table displays the shortcut keys for debugging
actions:

Action Keystroke
Set or remove a breakpoint for the line
of code containing the cursor
F9
Continue debugging after stopping at
a breakpoint
F5
Step to the next line of code in the current
script, executing and stepping over any functions
F10
Step to the next line of code to be executed,
including stepping into a function
F8
End debugging and close debugging windows Shift+F5

Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x