Previewing program code: Difference between revisions
(Created page with "__TOC__ <span class="f_Para">If you work with User Language programs that require an appreciably long time to download for debugging, due to their size alone or to a slow netw...") |
No edit summary |
||
Line 28: | Line 28: | ||
* <span class="f_ListBul2">To skip the program: </span> | * <span class="f_ListBul2">To skip the program: </span> | ||
:: Click the Client's <var>Run</var><span class="f_ListContinue2"> button, or select the </span><var>Skip Previewed Source</var><span class="f_ListContinue2"> option from the </span><var>Execution</var><span class="f_ListContinue2"> menu, or use a button or hot key you mapped to the </span><span class="f_CodeExample">skipPreview</span><span class="f_ListContinue2"> command. </span> | :: Click the Client's <var>Run</var><span class="f_ListContinue2"> button, or select the </span><var>Skip Previewed Source</var><span class="f_ListContinue2"> option from the </span><var>Execution</var><span class="f_ListContinue2"> menu, or use a button or hot key you mapped to the </span><span class="f_CodeExample">skipPreview</span><span class="f_ListContinue2"> command. </span> | ||
[[Category:Debugger Home]] |
Latest revision as of 04:25, 29 November 2022
If you work with User Language programs that require an appreciably long time to download for debugging, due to their size alone or to a slow network connection or high network traffic, you may prefer to use a Debugger feature that lets you inspect a small "chunk" of the beginning of the program to decide whether to download the entire program for debugging or just to run it.
The Source Preview feature lets you download a program's initial 100 lines (at minimum). After inspection of this code chunk, you can download the entire program as usual or you can simply run the program without downloading it.
Enabling Source Preview
To enable the Source Preview feature (which is disabled by default):
- In the Client, select Preferences from the File menu (or use the CTRL-P keyboard shortcut).
- In the Preferences dialog box, in the Execution Options section, select the Source Preview checkbox (it is clear by default).
- The Minimum value (to the right of the Source Preview checkbox) is the default for the minimum length a source program must be in order to be previewed. No programs less than 1000 lines may be previewed. Modify this setting (increments of 1000; maximum of 100,000) if you want previewing available only for longer programs.
- The Size value (to the right of Minimum) is the default for the size of the preview code chunks. Modify this setting (increments of 100; maximum of 10,000) if you want larger chunks.
- Click the Done button to save your settings and enable the feature.
Operating in preview mode
When Source Preview is enabled and you encounter a program with a number of lines greater than or equal to the Source Preview Minimum setting, the following happens:
- As many as Source Preview Size lines of the program are sent to the Client Source Code page.
- The Status bar confirms that you are in preview mode and informs whether the source program compiles. It displays either Preview: good compile or Preview: bad compile. Even if the program does not compile, you will still have the option to download and view the entire program and its embedded compilation error messages.
- You inspect the preview and decide whether to download the entire program for debugging or to skip the debugging of the program. Or, if the program did not compile, you decide whether to download and view the entire program or to skip it.
- To download the entire program for debugging:
- Select the Debug Previewed Source option from the Execution menu, or use a button or hot key you mapped to the skipPreview command, or click the Client's Step button or perform a Source Code text search.
- To download the entire program to view compilation error messages:
- Select the Debug Previewed Source option from the Execution menu, or use a button or hot key you mapped to the debugPreview command.
- To skip the program:
- Click the Client's Run button, or select the Skip Previewed Source option from the Execution menu, or use a button or hot key you mapped to the skipPreview command.