Debugging Web Server persistent sessions: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "__TOC__ <span class="f_Para">You can use the </span><var>Janus Debugger</var><span class="f_Para"> to debug </span><var>Janus Web Server</var><span class="f_Para"> "persi...")
 
No edit summary
Line 19: Line 19:
: To invoke this feature:
: To invoke this feature:
# <span class="f_ListNumNote1">In the Client, select </span><var>Preferences</var><span class="f_ListNumNote1"> from the </span><var>File</var><span class="f_ListNumNote1"> menu (or use the CTRL-P keyboard shortcut). </span>
# <span class="f_ListNumNote1">In the Client, select </span><var>Preferences</var><span class="f_ListNumNote1"> from the </span><var>File</var><span class="f_ListNumNote1"> menu (or use the CTRL-P keyboard shortcut). </span>
# <span class="f_ListNumNote1">In the <var>Preferences</var><span class="f_ListNumNote1"> dialog box, locate the </span><var>Web Browser</var><span class="f_ListNumNote1"> text box (in the </span><var>Program Titles</var><span class="f_ListNumNote1"> section) and provide a text string that matches some or all of the browser identifying title that displays at the top of the browser window.</span><br />  The characters in your matching string can be any case and match anywhere in the browser title. Any trailing blanks you enter are preserved<br />[[File:preferences16h2_zoom55.gif|244x164px|preferences16h2]]</span>
# <span class="f_ListNumNote1">In the <var>Preferences</var><span class="f_ListNumNote1"> dialog box, locate the </span><var>Web Browser</var><span class="f_ListNumNote1"> text box (in the </span><var>Program Titles</var><span class="f_ListNumNote1"> section) and provide a text string that matches some or all of the browser identifying title that displays at the top of the browser window.</span><br />  The characters in your matching string can be any case and match anywhere in the browser title. Any trailing blanks you enter are preserved<br />
<!-- [[File:preferences16h2_zoom55.gif|244x164px|preferences16h2]]</span> -->
# <span class="f_ListNumNote1">Click </span><var>Done.</var><span class="f_ListNumNote1"> </span>
# <span class="f_ListNumNote1">Click </span><var>Done.</var><span class="f_ListNumNote1"> </span>
: The feature takes effect at the next execution of a <span class="f_ListBul1">$WEB_FORM_DONE</span><span class="f_ListNum1"> function. </span><span class="f_ListNumNoteContinue">The</span><span class="f_GUIlabel"> Web Browser</span><span class="f_ListNumNoteContinue"> setting that exists at the end of the Debugger Client session persists to the next run of the Client. </span>
: The feature takes effect at the next execution of a <span class="f_ListBul1">$WEB_FORM_DONE</span><span class="f_ListNum1"> function. </span><span class="f_ListNumNoteContinue">The</span><span class="term"> Web Browser</span><span class="f_ListNumNoteContinue"> setting that exists at the end of the Debugger Client session persists to the next run of the Client. </span>


'''Note:'''<span id="windows_suspended" class="hmanchor"></span><span class="f_ListNoteContinue"> By default, this feature does not take effect if the Client is not executing the part of a program that contains </span><span class="f_ListNumNoteContinue">the </span><span class="f_ListBul1">$WEB_FORM_DONE</span><span class="f_ListNumNoteContinue">. For example, the statement might be in code selected to be [[Excluding sections of source code from debugging|excluded from debugging.]] </span>
'''Note:'''<span id="windows_suspended" class="hmanchor"></span><span class="f_ListNoteContinue"> By default, this feature does not take effect if the Client is not executing the part of a program that contains </span><span class="f_ListNumNoteContinue">the </span><span class="f_ListBul1">$WEB_FORM_DONE</span><span class="f_ListNumNoteContinue">. For example, the statement might be in code selected to be [[Excluding sections of source code from debugging|excluded from debugging.]] </span>
: However, if you also select the <span class="term">Windows When Suspended</span><span class="f_ListNumNoteContinue"> option in the </span><var>Preferences</var><span class="f_ListNumNote1"> dialog box (</span><span class="term">Execution Options</span><span class="f_ListNumNote1"> section), </span><span class="f_ListNumNoteContinue">you can make the feature apply whenever this statement occurs, even in code the Debugger is not actively executing. </span>
: However, if you also select the <span class="term">Windows When Suspended</span><span class="f_ListNumNoteContinue"> option in the </span><var>Preferences</var><span class="f_ListNumNote1"> dialog box (</span><span class="term">Execution Options</span><span class="f_ListNumNote1"> section), </span><span class="f_ListNumNoteContinue">you can make the feature apply whenever this statement occurs, even in code the Debugger is not actively executing. </span>
 
<!-- [[File:preferences17hfrag_zoom60.gif|276x181px|preferences17hfrag]]<span class="f_ListNumNoteContinue"> </span> -->
[[File:preferences17hfrag_zoom60.gif|276x181px|preferences17hfrag]]<span class="f_ListNumNoteContinue"> </span>


==== Legacy Support sessions ====
==== Legacy Support sessions ====
Line 50: Line 50:
# <span class="f_ListNumNote1">Select </span><var>Preferences</var> from the <var>File</var><span class="f_ListNumNote1"> menu. </span>
# <span class="f_ListNumNote1">Select </span><var>Preferences</var> from the <var>File</var><span class="f_ListNumNote1"> menu. </span>
# <span class="f_ListNumNote1">In the <var>Preferences</var> dialog box, locate the <var>Web Browser</var><span class="f_ListNumNote1"> text box (in the </span><var>Program Titles</var><span class="f_ListNumNote1"> section) and provide a text string that matches some or all of the title that displays at the top of the browser window.</span><br />  The characters in your matching string can be any case and match anywhere in the title. Any trailing blanks you enter are preserved.</span>
# <span class="f_ListNumNote1">In the <var>Preferences</var> dialog box, locate the <var>Web Browser</var><span class="f_ListNumNote1"> text box (in the </span><var>Program Titles</var><span class="f_ListNumNote1"> section) and provide a text string that matches some or all of the title that displays at the top of the browser window.</span><br />  The characters in your matching string can be any case and match anywhere in the title. Any trailing blanks you enter are preserved.</span>
# <span class="f_ListNumNote1">Click </span><span class="f_GUIlabel">Done.</span><span class="f_ListNumNote1"> </span>
# <span class="f_ListNumNote1">Click </span><span class="term">Done.</span><span class="f_ListNumNote1"> </span>


[[Category:Debugger Home]]
[[Category:Debugger Home]]

Revision as of 03:21, 4 April 2023

You can use the Janus Debugger to debug Janus Web Server "persistent session" applications. These are applications in which Online program execution is suspended while a browser user returns data to the program, whereupon the program continues. The Debugger supports two such types of Web Server programs:

  • HTML form processing using the $WEB_FORM_DONE SOUL function
  • Janus Web Legacy Support, which presents 3270 screens in a web browser

$WEB_FORM_DONE sessions 

Using the $WEB_FORM_DONE function, a SOUL program can serve an HTML form, suspend execution until the form is submitted, then resume executing the program at the point where it was suspended.

To debug a $WEB_FORM_DONE application:

  1. Invoke the program from your browser; then, in the Debugger Client, step through the program as usual.
  2. When a $WEB_FORM_DONE function call executes, the execution of the SOUL program pauses, and Session awaits browser displays in the Status bar.  
  3. Move from the Client to your browser, respond to the HTML form inputs, and submit the form.
  4. Return to the Client, where Persistent Session Resumed displays in the Status bar, and continue debugging.

Note: As a convenience, the Debugger can make your web browser window the topmost on your PC screen when the Client pauses as it processes the $WEB_FORM_DONE call.

To invoke this feature:
  1. In the Client, select Preferences from the File menu (or use the CTRL-P keyboard shortcut).
  2. In the Preferences dialog box, locate the Web Browser text box (in the Program Titles section) and provide a text string that matches some or all of the browser identifying title that displays at the top of the browser window.
    The characters in your matching string can be any case and match anywhere in the browser title. Any trailing blanks you enter are preserved
  3. Click Done.
The feature takes effect at the next execution of a $WEB_FORM_DONE function. The Web Browser setting that exists at the end of the Debugger Client session persists to the next run of the Client.

Note: By default, this feature does not take effect if the Client is not executing the part of a program that contains the $WEB_FORM_DONE. For example, the statement might be in code selected to be excluded from debugging.

However, if you also select the Windows When Suspended option in the Preferences dialog box (Execution Options section), you can make the feature apply whenever this statement occurs, even in code the Debugger is not actively executing.

Legacy Support sessions

By automatically converting 3270 screens to HTML, the Janus Web Legacy Support feature lets you run under the Janus Web Server applications that do 3270 full screen reads. You can debug such an application with the Janus Debugger only if you also license the TN3270 Debugger.

To debug a Legacy Support application:

  1. Invoke the User Language program from your browser, and in the Debugger Client, step through the program as usual.
  2. When a READ SCREEN executes, the execution of the program pauses, and Session awaits browser displays in the Status bar.  
    If you have not also purchased the TN3270 Debugger, the web thread is softly restarted and the debugging session is terminated.
  3. Move from the Debugger Client to your web browser, respond to the screen (now HTML form) prompts, and submit the form by clicking the Enter button or a PF key button.
  4. Return to the Debugger Client, where Persistent Session Resumed displays in the Status bar, and continue debugging.

These events are reported in a sequence of lines in the Client Audit Trail page like the following:

2010 11 08 10:01:48.27   2   20 LI I SCREENO   2010 11 08 10:01:48.27   2   20 MS M204.1168: IN FILE GWDEB INCLUDE SCREENO 2010 11 08 10:02:10    Full Screen Read Pending  2010 11 08 10:02:22    READ SCREEN completed  

Note: As described above for $WEB_FORM_DONE applications, the Debugger can bring your browser to the top on your PC screen when the Client pauses for the READ SCREEN.

To invoke this feature:
  1. Select Preferences from the File menu.
  2. In the Preferences dialog box, locate the Web Browser text box (in the Program Titles section) and provide a text string that matches some or all of the title that displays at the top of the browser window.
    The characters in your matching string can be any case and match anywhere in the title. Any trailing blanks you enter are preserved.
  3. Click Done.