home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a009 / 5.ddi / DOC.LIF / DEBUGGER.DOC next >
Encoding:
Text File  |  1991-04-14  |  172.1 KB  |  6,007 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                                       
  13.                                       
  14.                             The Clipper Debugger
  15.                                 Version 5.01
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.      The Clipper Debugger
  72.  
  73.         Copyright (C) 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991
  74.         Nantucket Corporation.
  75.         All Rights Reserved.  
  76.         
  77.         No part of this publication may be reproduced, transmitted,
  78.         transcribed, stored in a retrieval system, or translated into
  79.         any other language or computer language in whole or in part,
  80.         in any form or by any means, whether it be electronic,
  81.         mechanical, magnetic, optical, manual or otherwise, without
  82.         prior written consent of Nantucket Corporation, 12555 W.
  83.         Jefferson Blvd., Suite 300, Los Angeles, California 90066.
  84.         
  85.         Clipper 5.0 user documentation is printed in the U.S.A. 
  86.         Nantucket believes that the user documentation (both printed
  87.         and online) accompanying the program contains the necessary
  88.         information to utilize the program.  However, Nantucket
  89.         reserves the right to make revisions and/or periodic changes
  90.         to the user documentation content without the direct or
  91.         inferred obligation of Nantucket to notify any person of such
  92.         revisions or changes.  Except for the limited warranty set
  93.         forth in the applicable Nantucket Software License Agreement
  94.         accompanying this product, the user documentation is provided
  95.         "as is."  Nantucket makes no other warranty, express or
  96.         implied, with respect to the software and/or user
  97.         documentation, and specifically disclaims the implied
  98.         warranties of merchantability and fitness for a particular
  99.         purpose.  Nantucket does not warrant that the software and/or
  100.         user documentation will meet your requirements or that the
  101.         operation/use of the software and/or user documentation will
  102.         be uninterrupted or error free.  You are solely responsible
  103.         for the selection of the software and/or user documentation to
  104.         achieve your intended results and for the results actually
  105.         obtained.  Except as specifically set forth in the applicable
  106.         Nantucket Software License Agreement accompanying this
  107.         product, Nantucket does not assume responsibility for the use
  108.         of the software and/or user documentation. 
  109.         
  110.         The software contains valuable copyrights, trade secrets and
  111.         proprietary information all of which are reserved by Nantucket
  112.         and subject only to the license granted herein.  Unauthorized
  113.         use of the documentation or the software can result in civil
  114.         damages and criminal prosecution.  Please refer to the
  115.         applicable Nantucket Software License Agreement accompanying
  116.         this product for additional information.
  117.         
  118.      Copyright, Trademark and Service Mark Notices
  119.  
  120.         Nantucket (R), the Nantucket logo, and Clipper (R) are
  121.         registered trademarks of Nantucket Corporation.  Nantucket
  122.         News (TM) is a trademark of Nantucket Corporation.  Nantucket
  123.         Support (sm) is a service mark of Nantucket Corporation.  The
  124.         Guide To Clipper (R) is a product of Nantucket Corporation.
  125.         
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.         dBASE (R), dBASE III (R), dBASE IV (R) and Ashton-Tate (R) are
  138.         registered trademarks of Ashton-Tate Corporation.  dBASE III
  139.         PLUS (TM) is a trademark of Ashton-Tate Corporation.
  140.         IBM (R), PC-DOS (R) and PC-AT (R) are registered trademarks of
  141.         International Business Machines Corporation.
  142.         Intel (R) is a registered trademark of Intel Corporation.
  143.         Microsoft (R) is a registered trademark of Microsoft
  144.         Corporation.
  145.         Microsoft (R) C Runtime Library Routines, (C) Microsoft
  146.         Corporation 1984, 1985, 1986, 1987.  All Rights Reserved.
  147.         MS-DOS (R) is a registered trademark of Microsoft Corporation.
  148.         MASM (TM) is a trademark of Microsoft Corporation.
  149.         The Norton Instant Access Engine (TM) is a trademark of Peter
  150.         Norton Computing Incorporated.
  151.         .RTLINK (TM), (C) Pocket Soft, Inc., 1988, 1989.  .RTLink is a
  152.         trademark of Pocket Soft Inc.
  153.         
  154.         Trademarks of other companies mentioned in this documentation
  155.         appear for identification purposes only.
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.      Credits
  204.  
  205.         Software Development
  206.         
  207.           Architect
  208.             Richard McConnell
  209.           
  210.           Primary Developers 
  211.             Dennis L. Dias
  212.             Basil Hosmer
  213.             Richard McConnell
  214.           
  215.           Key Contributors
  216.             Brian Russell (architecture and implementation)
  217.             Eric Jakstadt (linker)
  218.             Corey Schwartz (debugger)
  219.             Leonard Zerman (install system)
  220.  
  221.         Documentation 
  222.  
  223.             Christopher White
  224.             Deborah Ridolfo
  225.             Debby Moody
  226.             Savannah Brentnall
  227.             
  228.           Key Contributors
  229.             Charles R. Gehman (desktop publishing) 
  230.  
  231.           Administration
  232.             Dana Wood
  233.  
  234.         Software Test
  235.  
  236.             Phil Usher
  237.             Ed Bell
  238.             Tom Chang
  239.             Woon L. Leong
  240.             Tim Wong
  241.             Fred Ho
  242.             Jon Rognerud
  243.  
  244.      Special thanks to the beta test sites and documentation reviewers
  245.      whose efforts and patience helped make Clipper 5.01 a reality.
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.      ==================================================================
  270.                              Table of Contents
  271.  
  272.      ------------------------------------------------------------------
  273.  
  274.           Chapter 1:  Introduction to the Debugger............1-1
  275.           
  276.           Chapter 2:  Starting the Debugger...................2-1
  277.           
  278.           Chapter 3:  The Debugger Display....................3-1
  279.           
  280.           Chapter 4:  Debugging a Program.....................4-1
  281.           
  282.           Chapter 5:  Command Reference.......................5-1
  283.           
  284.           Glossary
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.      ==================================================================
  336.      Chapter 1:  Introduction to the Debugger
  337.  
  338.      ------------------------------------------------------------------
  339.  
  340.           In This Chapter                   1-1
  341.           
  342.           What is a Debugger?               1-1
  343.           
  344.           Symbols and Conventions           1-2
  345.           
  346.           System Requirements               1-2
  347.           
  348.           What does The Clipper
  349.           Debugger do?                      1-2
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.          Chapter 1 -- Introduction to the Debugger
  402.  
  403.          Welcome to The Clipper Debugger.  Although you may already be
  404.          familiar with the process of debugging a compiled
  405.          application, we recommend that you take the time to read this
  406.          chapter.  The terms used throughout this manual are explained
  407.          here, together with a list of requirements for using the
  408.          Debugger and descriptions of some of the most commonly used
  409.          features.  
  410.  
  411.  
  412.       -----------------------------------------------------------------
  413.       In This Chapter
  414.  
  415.          This chapter provides a brief overview of the Debugger and
  416.          explains some of its most powerful features.  The following
  417.          topics are covered:
  418.  
  419.          *  What is a Debugger?
  420.  
  421.          *  Symbols and conventions
  422.  
  423.          *  System requirements
  424.  
  425.          *  What does The Clipper Debugger do?
  426.  
  427.  
  428.       -----------------------------------------------------------------
  429.       What is a Debugger?
  430.  
  431.          Once you have finished writing a program, it must be tested
  432.          to make sure there are no errors.  Some errors will be
  433.          spotted by the compiler or linker; in these cases,
  434.          corrections can be made without having to actually execute
  435.          the program.
  436.  
  437.          It is not at all unusual for a program to contain errors
  438.          which can only be spotted while the program is running.  This
  439.          is where a debugger becomes useful.  As its name suggests, a
  440.          Debugger is a tool that helps you track down and remove
  441.          errors (bugs) from your source code.
  442.  
  443.          The Clipper Debugger allows you to look at your source code
  444.          while your program is running.  Whenever you notice an error,
  445.          simply edit the code, re-compile, re-link, and try again. 
  446.          You may need to perform these steps several times.
  447.  
  448.          Other features of the Debugger include watching the values of
  449.          variables and expressions as your program executes, examining
  450.          database (.dbf) files and executing your program slowly, a
  451.          line at a time.
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                                                    Introduction    1-1
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.       -----------------------------------------------------------------
  468.       Symbols and Conventions
  469.  
  470.          In order to specify commands in a general way, certain
  471.          symbols are used to identify special behavior.  For example,
  472.          keywords and metasymbols in square brackets are optional. 
  473.          The following table shows a list of symbols used throughout
  474.          this manual:
  475.  
  476.          Table 1-1: Symbols
  477.          --------------------------------------------------------------
  478.          Symbol   Description
  479.          --------------------------------------------------------------
  480.          < >      Indicates an item that is entered by the user
  481.          [ ]      Indicates an optional item or list
  482.           |       Indicates two or more mutually exclusive options
  483.          --------------------------------------------------------------
  484.  
  485.  
  486.       -----------------------------------------------------------------
  487.       System Requirements
  488.  
  489.          *  At least one disk drive
  490.  
  491.          *  512K of RAM memory
  492.  
  493.          *  Clipper 5.0
  494.  
  495.          *  DOS version 2.0 or greater
  496.  
  497.          The Debugger will work on any IBM PC or compatible.  At least
  498.          one disk drive is needed for installation, and a hard disk is
  499.          recommended.  Your computer should have at least 512K of
  500.          memory, but 640K or more is preferred for best results.  The
  501.          operating system must be DOS version 2.0 or higher.
  502.  
  503.  
  504.       -----------------------------------------------------------------
  505.       What does The Clipper Debugger do?
  506.  
  507.          There are certain features in The Clipper Debugger that you
  508.          will find yourself using over and over again.  This section
  509.          is intended as a quick guide to each of these features; more
  510.          detailed explanations can be found in Chapter 3, The Debugger
  511.          Display and Chapter 5, Command Reference.
  512.  
  513.  
  514.          --------------------------------------------------------------
  515.          Trace Source Code Line by Line
  516.  
  517.          When you run a program from within the Debugger, the source
  518.          code is displayed inside a window called the Code Window.  A
  519.          horizontal Execution Bar highlights each line of code as it
  520.          is executed, allowing you to see the progress of your
  521.  
  522.  
  523.  
  524.  
  525.  
  526.                                                    Introduction    1-2
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.          application.  This can often help eliminate logic or looping
  534.          errors.  The speed of the display can be controlled to suit
  535.          your needs.
  536.  
  537.  
  538.          --------------------------------------------------------------
  539.          Inspect the Values of Variables and Expressions
  540.  
  541.          While debugging your application, you may want to examine a
  542.          memory or field variable.  This is called inspecting a
  543.          variable.  Using a highlight bar, the Debugger allows you to
  544.          select from a list of variables and enter a new value for
  545.          your selection.  This value is then assigned to the variable
  546.          you selected.
  547.  
  548.          In addition, any valid expression can be inspected.  This
  549.          includes Clipper functions, code blocks, macro expressions
  550.          and user-defined functions.  In these cases, the specified
  551.          code is actually executed, and the return value displayed. 
  552.  
  553.  
  554.          --------------------------------------------------------------
  555.          Create New Variables
  556.  
  557.          Often, an error in your application is caused by the failure
  558.          to create a particular variable.  Using the ?|?? command and
  559.          the := operator, the Debugger allows you to create a new
  560.          PRIVATE variable and assign it a value.  You can then
  561.          continue debugging, and correct the error on your next
  562.          edit/compile/link cycle.
  563.  
  564.  
  565.          --------------------------------------------------------------
  566.          Execute Linked Procedures and Functions
  567.  
  568.          Any procedure or function which has been compiled and linked
  569.          with your application can be executed during a debugging
  570.          session.  This provides an easy way to extend the
  571.          functionality of the Debugger: simply write a function to
  572.          perform the desired action, re-compile, re-link, and execute.
  573.  
  574.  
  575.          --------------------------------------------------------------
  576.          Inspect Work Areas and Set Values
  577.  
  578.          There may be times when you need to examine the structure of
  579.          a database (.dbf) file.  The Debugger uses the View Workareas
  580.          Window to provide this information.  The names of the
  581.          databases open in each work area are shown on the left pane
  582.          of the window with the currently selected file enclosed in
  583.          angle brackets (< >).  The work area flag settings and file
  584.          structure for the highlighted filename appear on the right.
  585.  
  586.          There is a similar window called the View Sets Window that
  587.          allows you to inspect and change the status of Clipper SET
  588.          commands.
  589.  
  590.  
  591.  
  592.                                                    Introduction    1-3
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.      ==================================================================
  600.      Chapter 2:  Starting the Debugger
  601.  
  602.      ------------------------------------------------------------------
  603.  
  604.           In This Chapter                   2-1
  605.           
  606.           Preparing your Programs for
  607.           Debugging                         2-1
  608.           
  609.           Invoking the Debugger             2-4
  610.           
  611.           How the Debugger Searches
  612.           for Files                         2-7
  613.           
  614.           Using a Script File               2-7
  615.           
  616.           Getting Help                      2-8
  617.           
  618.           Leaving the Debugger              2-9
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.          Chapter 2 -- Starting the Debugger
  666.  
  667.          In order to debug an application, you must first create your
  668.          executable (.EXE) file using the compiler option for
  669.          debugging.  You can then invoke the Debugger and begin the
  670.          debugging session.  Some parts of your application may
  671.          require source code changes in order to be properly debugged;
  672.          each of these changes is explained here.
  673.  
  674.  
  675.       -----------------------------------------------------------------
  676.       In This Chapter
  677.  
  678.          This chapter explains the compilation process, necessary
  679.          program changes and some techniques to increase debugging
  680.          speed.  The following topics are covered:
  681.  
  682.          *  Preparing your programs for debugging
  683.  
  684.          *  Invoking the Debugger
  685.  
  686.          *  How the Debugger searches for files
  687.  
  688.          *  Using a script file
  689.  
  690.          *  Getting help
  691.  
  692.          *  Leaving the Debugger
  693.  
  694.  
  695.       -----------------------------------------------------------------
  696.       Preparing Your Programs for Debugging
  697.  
  698.          To take full advantage of the features offered by The Clipper
  699.          Debugger, there are certain changes you may want to make to
  700.          your source code.  This section describes these changes,
  701.          together with an explanation of the compilation process.
  702.  
  703.  
  704.       Compiling Your Source Code
  705.  
  706.          The first step in debugging an application with the Debugger
  707.          is to compile using the /B compiler option.  This option
  708.          tells the compiler to include debugging information in the
  709.          object (.OBJ) file.  For example:
  710.  
  711.          CLIPPER MainProg /B
  712.          
  713.          In this example, all programs called by MainProg.prg are also
  714.          compiled with the /B option.  If, however, you have used
  715.          (.clp) files or have compiled each program in your
  716.          application separately, you must specify the /B option every
  717.          time you invoke the compiler.  During the debugging session,
  718.          any subsidiary programs which have been compiled without this
  719.          option are ignored.
  720.  
  721.  
  722.  
  723.  
  724.                                           Starting the Debugger    2-1
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.          --------------------------------------------------------------
  732.          Warning
  733.  
  734.          In order to use The Clipper Debugger, your application must
  735.          be compiled with Clipper 5.0.
  736.          --------------------------------------------------------------
  737.  
  738.  
  739.       Programming Considerations
  740.  
  741.          Certain parts of your code present special problems when
  742.          debugging.  This section explains the techniques for
  743.          debugging multi-statement command-lines, header files,
  744.          manifest constants, pseudo-functions, code blocks and macros.
  745.  
  746.  
  747.          --------------------------------------------------------------
  748.          Multi-statement Command-lines
  749.  
  750.          Clipper 5.0 allows you to place more than one program
  751.          statement on a single line.  For example:
  752.  
  753.          nNewPage = (nLineNo > 55); ReportPage(nNewPage)
  754.          
  755.          When you use Uparrow or Dnarrow in the Code Window, the
  756.          cursor moves up and down one complete line at a time.  This
  757.          is true regardless of how many statements are on the line in
  758.          question.  In the above example, the Debugger does not allow
  759.          you to "step" through the first and second statements
  760.          independently, nor does it allow you to set a Breakpoint at
  761.          either statement.  The entire line is treated as a single
  762.          entity.
  763.  
  764.          The code in the above example should be broken up into two
  765.          lines, as follows:
  766.  
  767.          nNewPage = (nLineNo > 55)
  768.          ReportPage(nNewPage)
  769.          
  770.          This makes debugging easier, and also makes the code more
  771.          readable.
  772.  
  773.  
  774.          --------------------------------------------------------------
  775.          Header Files
  776.  
  777.          Header files are files which are referenced using the
  778.          #include pre-processor directive.  They typically contain
  779.          manifest constant and pseudo-function definitions, but can
  780.          also contain program source code.
  781.  
  782.          To view a header file, press Alt-F to access the File menu,
  783.          and select the Open option.  A dialog box is displayed and
  784.          you are asked to enter the name of the file you want to
  785.  
  786.  
  787.  
  788.  
  789.  
  790.                                           Starting the Debugger    2-2
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.          view.  Simply enter the name of the header file and its
  798.          extension, and press Return.  The code for the specified
  799.          header file appears in the Code Window.
  800.  
  801.  
  802.          --------------------------------------------------------------
  803.          Manifest Constants and Pseudo-functions
  804.  
  805.          Constants and pseudo-functions defined with the #define
  806.          pre-processor directive cannot be inspected in the same way
  807.          as variables and expressions.  As their name suggests,
  808.          pre-processor directives are instructions to the
  809.          pre-processor and do not exist at runtime.  If you compile a
  810.          program using the /P compiler option, a file with a (.ppo)
  811.          extension is produced.  This file shows the pre-processor
  812.          output, and can be viewed using the Preprocessed Code option
  813.          on the Options menu.  When this menu option is selected
  814.          (indicated by a check mark) each line of source code is
  815.          displayed in the Code Window with the output from the
  816.          pre-processor shown underneath.
  817.  
  818.  
  819.          --------------------------------------------------------------
  820.          Code Blocks
  821.  
  822.          A code block contains executable program code which is
  823.          treated by Clipper 5.0 as data and can be passed as a
  824.          parameter to other programs.  This program code is compiled
  825.          at compile-time, and inspecting the code block only reveals
  826.          its name, not the actual code.  However, code blocks can be
  827.          executed from within the Debugger as follows:
  828.  
  829.          > ? EVAL(bMyBlock) <Return>
  830.          
  831.          This example, when entered in the Command Window, causes the
  832.          code block bMyBlock to be evaluated.  Any code within
  833.          bMyBlock is executed and displayed accordingly.
  834.  
  835.          When "stepping" through a piece of code containing a code
  836.          block, the Execution Bar moves to the line of code where the
  837.          block was created each time the code block is evaluated. 
  838.          This allows you to see the contents of the block (which are
  839.          unavailable during normal inspection), and occurs regardless
  840.          of whether the block was declared in the current routine.
  841.  
  842.  
  843.          --------------------------------------------------------------
  844.          Macro Substitution
  845.  
  846.          The Debugger treats macros as ordinary character strings.  As
  847.          such, they can be inspected or viewed using the ?|??
  848.          command.  For example:
  849.  
  850.          > ? ¯oVar <Return>
  851.          
  852.  
  853.  
  854.  
  855.  
  856.                                           Starting the Debugger    2-3
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.          displays the contents of the expanded macro variable
  864.          macroVar.
  865.  
  866.          If the macro variable refers to a code block, the ?|??
  867.          command merely displays the code block symbol: "{||...}." 
  868.          Since the code contained within the code block was compiled
  869.          at compile-time, it is not available to The Clipper Debugger.
  870.  
  871.  
  872.       -----------------------------------------------------------------
  873.       Invoking the Debugger
  874.  
  875.          There are several ways to invoke the Debugger, each of which
  876.          is discussed below.  All of the methods require that the
  877.          application be compiled with the /B option--debugging is not
  878.          possible otherwise.
  879.          
  880.          
  881.       From DOS
  882.  
  883.          To invoke the Debugger from the DOS prompt, use the following
  884.          syntax:
  885.  
  886.          CLD [[/43 | /50 | /S] [@<scriptFile>]
  887.             <exeFile> [<argument list>]]
  888.          
  889.          CLD.EXE is The Clipper Debugger executable file.  If you
  890.          installed the Clipper 5.0 development system using the
  891.          default configuration, CLD.EXE is located in the
  892.          \CLIPPER5\BIN directory and your DOS PATH should be altered
  893.          accordingly.
  894.  
  895.          /43 | /50 | /S specifies the screen mode used by the
  896.          Debugger.  These three options are mutually exclusive and, if
  897.          more than one is specified, CLD.EXE uses the last one that
  898.          occurs on the command-line.  The default screen mode is 25
  899.          lines, with the Debugger using the entire screen.
  900.  
  901.          /43 specifies 43 line mode and is available on EGA monitors
  902.          only.
  903.  
  904.          /50 specifies 50 line mode and is available on EGA and VGA
  905.          monitors only.
  906.  
  907.          /S is available on EGA and VGA monitors only.  This option
  908.          splits the screen between your application and the Debugger,
  909.          allowing you to view the application and the Debugger
  910.          simultaneously.  On a VGA monitor /S uses 50 line mode, and
  911.          on an EGA monitor it uses 43 line mode.  In split screen
  912.          mode, the top 25 lines of the screen are used by your
  913.          application, and the remaining lines are used for the
  914.          Debugger display.  In this mode, you cannot move or size
  915.          windows in the Debugger.
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.                                           Starting the Debugger    2-4
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.          <scriptFile> is the name of a script file with a default
  930.          extension of (.cld).  CLD searches for the specified
  931.          <scriptFile> in the current directory and then searches the
  932.          DOS PATH.  A script file is simply an ASCII text file
  933.          containing one or more Debugger commands, with each command
  934.          appearing on a separate line.  When the Debugger is invoked
  935.          with a script file, each command in the file is executed
  936.          automatically after the <exeFile> file is loaded.
  937.  
  938.          In addition to any script file called for on the CLD
  939.          command-line, the Debugger automatically searches for a
  940.          script file with the name Init.cld.  If a file by this name
  941.          is located in the current directory or anywhere in the DOS
  942.          PATH, the Debugger executes it as a script file.  If both
  943.          Init.cld and a command-line script file are present, Init.cld
  944.          is executed first followed by the command-line script file.
  945.  
  946.          <exeFile> is the name of the executable (.EXE) file you want
  947.          to debug.  CLD searches for the <exeFile> in the current
  948.          directory only--the DOS PATH is not searched.  If this file
  949.          has not been compiled using the /B compiler option to embed
  950.          debugging information, debugging is not possible.
  951.  
  952.          <argument list> is the argument list for <exeFile>.
  953.  
  954.          Note that with the exception of the argument list, all other
  955.          CLD arguments must come before the executable filename on the
  956.          command-line.  If no command-line arguments are specified,
  957.          CLD displays a brief help screen.
  958.          
  959.          
  960.       Linking the Debugger
  961.  
  962.          Under certain circumstances, you may want to link the
  963.          Debugger into your application.  Doing this would allow you,
  964.          for example, to debug a program at a customer's site in the
  965.          event that an unforeseen problem occurred after the
  966.          application was already in the field.
  967.  
  968.          The Debugger library, CLD.LIB, must be linked into your
  969.          program as an object file as in the following example:
  970.  
  971.          C>RTLINK FI Myprog, \CLIPPER5\LIB\CLD.LIB <Return>
  972.          
  973.          Again, your program must be compiled with the /B option. 
  974.          When the Debugger is linked into a program in this manner, it
  975.          does not come up automatically but must be invoked.
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.                                           Starting the Debugger    2-5
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.          --------------------------------------------------------------
  996.          Invoking with Alt-D
  997.  
  998.          When an application is linked with CLD.LIB as one of the
  999.          object files, the Debugger is enabled and can be invoked by
  1000.          pressing Alt-D while the application is running.  Doing this
  1001.          invokes the Debugger with the Execution Bar positioned on the
  1002.          current line of executing code.
  1003.  
  1004.  
  1005.       Using ALTD()
  1006.  
  1007.          The ALTD() function serves two purposes: it allows you to
  1008.          control whether or not the Debugger is enabled or disabled,
  1009.          and it allows you to invoke the Debugger if it is enabled. 
  1010.          ALTD() can be used regardless of whether the Debugger is
  1011.          invoked using the CLD command-line or using Alt-D.
  1012.  
  1013.          When it appears in a program compiled with the /B option,
  1014.          ALTD() used with no arguments acts like a Breakpoint by
  1015.          stopping the application and giving control to the Debugger.
  1016.  
  1017.          ALTD(0) temporarily disables the Debugger so that any code
  1018.          following the function call is executed as if the Debugger
  1019.          were not present.  When the Debugger is disabled, all
  1020.          Breakpoints and Tracepoints are ignored and even calls to
  1021.          ALTD() and pressing Alt-D will not invoke the Debugger while
  1022.          it is disabled.
  1023.  
  1024.          ALTD(1) is used to enable the Debugger again.  Note that for
  1025.          programs compiled with /B, the default state for the Debugger
  1026.          is enabled.
  1027.  
  1028.          For applications that are linked with CLD.LIB, you can use
  1029.          ALTD() to prevent the user for inadvertently invoking the
  1030.          Debugger.  By including code similar to the following at the
  1031.          beginning of the main program, the ability to invoke the
  1032.          Debugger is controlled by the presence a command-line
  1033.          parameter:
  1034.  
  1035.          PARAMETERS dBug
  1036.          
  1037.          IF dBug != NIL
  1038.            ALTD(1)            // Invoke Debugger with ALTD() or Alt-D
  1039.          ELSE
  1040.            ALTD(0)            // Debugger cannot be invoked
  1041.          ENDIF
  1042.          
  1043.          Using the code shown above, the Debugger is disabled unless
  1044.          the application is invoked with an argument.  Even though the
  1045.          program may contain calls to ALTD() and the user may press
  1046.          Alt-D, the Debugger cannot be invoked unless the application
  1047.          command-line argument is specified.  If your application
  1048.          accepts other arguments, use dBug as the last one in the
  1049.          list.
  1050.  
  1051.  
  1052.  
  1053.  
  1054.                                           Starting the Debugger    2-6
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.       -----------------------------------------------------------------
  1063.       How the Debugger Searches for Files
  1064.  
  1065.          When you make a file open request to the Debugger, you may
  1066.          specify the drive, directory and file extension explicitly as
  1067.          part of the filename.  Otherwise, the Debugger makes certain
  1068.          assumptions about the filename and location.
  1069.  
  1070.          Depending on the context of the file open request, the
  1071.          default file extension supplied by the Debugger varies.  For
  1072.          example, when the request is for a script file the Debugger
  1073.          assumes a (.cld) extension and for a pre-processed output
  1074.          file the default extension is (.ppo).  Default file
  1075.          extensions are supplied only when you do not specify an
  1076.          explicit file extension.
  1077.  
  1078.          If no explicit file location (i.e., drive or directory) is
  1079.          specified or if the file location cannot be obtained from the
  1080.          application, the Debugger looks for the file in the current
  1081.          directory.   Then, with the exception of the .EXE file, the
  1082.          Debugger searches the DOS PATH--the Debugger searches for the
  1083.          executable file in the current directory only.  Only after
  1084.          these locations are exhausted will an error message be
  1085.          displayed indicating that the file could not be found.
  1086.  
  1087.  
  1088.       -----------------------------------------------------------------
  1089.       Using a Script File
  1090.  
  1091.          The Debugger allows you to record commands in a script file
  1092.          and execute the commands directly from the file.  A script
  1093.          file is simply an ASCII text file that can be created and
  1094.          edited using any word processor.  The file consists of one or
  1095.          more Debugger commands, with each command on a new line in
  1096.          the file and has a default extension of (.cld).
  1097.  
  1098.          Some programs may require several debug/edit/compile/link
  1099.          cycles in order to trace persistent errors.  Recording
  1100.          repetitive commands in a script file eliminates the amount of
  1101.          typing necessary to reach the same position in your
  1102.          application each time.  For example, the following script
  1103.          file sets a Breakpoint at the first call to the function
  1104.          ViewData(), designates the variables lMadeChanges and
  1105.          lSaveChanges as Watchpoints, and specifies nFieldNum and
  1106.          nFileArea as Tracepoints:
  1107.  
  1108.          BP ViewData
  1109.          WP lMadeChanges
  1110.          WP lSaveChanges
  1111.          TP nFieldNum
  1112.          TP nFileArea
  1113.          
  1114.          Another advantage to using script files is to record
  1115.          preferred Debugger settings so that you do not have to set
  1116.          them each time you debug.  The easiest way to record option
  1117.  
  1118.  
  1119.  
  1120.                                           Starting the Debugger    2-7
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.          settings in a script file is to set them using the Debugger
  1128.          menus.  Then, select the Save Settings option from the
  1129.          Options menu and enter a filename when prompted.  The script
  1130.          file is saved to disk and can be used or modified at any
  1131.          time.
  1132.  
  1133.          The settings that you can save in this way include most
  1134.          Options menu settings, the Monitor menu settings, and case
  1135.          sensitivity and Callstack status.  As an alternative to
  1136.          setting the options and saving them to a script file using
  1137.          the Options menu, you can include the appropriate menu
  1138.          commands in any script file.  Menu commands are formed using
  1139.          the menu name followed by the first word of the menu option
  1140.          you want to set.  Any necessary arguments are placed at the
  1141.          end of the command.  An example of some menu command settings
  1142.          recorded in a script file follows:
  1143.  
  1144.          Locate Case
  1145.          Monitor Local
  1146.          View Callstack
  1147.          Options Line
  1148.          Options Tab 3
  1149.          
  1150.          When the Debugger is active, you can execute a script file
  1151.          with the View Restore option in the Options menu or with the
  1152.          INPUT command as in the following example:
  1153.  
  1154.          > INPUT MyScript <Return>
  1155.          
  1156.          You can also execute a script file from the Debugger
  1157.          command-line as in the following example:
  1158.  
  1159.          C>CLD @MyScript MainProg <Return>
  1160.          
  1161.          Each time the Debugger is invoked, it automatically searches
  1162.          for a script file with the name Init.cld.  If a file by this
  1163.          name is located in the current directory or anywhere in the
  1164.          DOS PATH, the Debugger executes it as a script file.  If both
  1165.          Init.cld and a command-line script file are present, Init.cld
  1166.          is executed first followed by the command-line script file.
  1167.  
  1168.  
  1169.       -----------------------------------------------------------------
  1170.       Getting Help
  1171.  
  1172.          The Clipper Debugger offers on-line help in the form of the
  1173.          Help Window, which is divided into two panes: the left pane
  1174.          contains a list of topics for which help is available, and
  1175.          the right pane contains the help text for the currently
  1176.          highlighted topic.  You can activate the Help Window by using
  1177.          the Help menu, pressing F1, or entering the HELP command.
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.                                           Starting the Debugger    2-8
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.          There are several main topics of discussion in the Help
  1194.          Window including About Help, Keys, Windows, Menus, and
  1195.          Commands.  When the Help Window is first activated, one of
  1196.          these topics is highlighted on the left, and the text on the
  1197.          right discusses the topic.
  1198.  
  1199.          To get help on a particular topic, highlight it using Uparrow
  1200.          or DnArrow.  As the highlight moves, the associated help text
  1201.          on the right changes to reflect the current topic.
  1202.  
  1203.          If the indicator at the bottom right of the window shows more
  1204.          than one page of information, use PgUp and PgDn to scroll the
  1205.          help text.
  1206.  
  1207.          Press Esc to remove the Help Window and continue debugging.
  1208.  
  1209.          For more information on the Help Window, see Chapter 3, The
  1210.          Debugger Display.
  1211.  
  1212.  
  1213.       -----------------------------------------------------------------
  1214.       Leaving the Debugger
  1215.  
  1216.          When you have finished your debugging session, select the
  1217.          Exit option from the File menu, press Alt-X, or enter the
  1218.          QUIT command.  The Debugger automatically closes all files
  1219.          and returns you to the DOS prompt.
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.                                           Starting the Debugger    2-9
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.      ==================================================================
  1260.      Chapter 3:  The Debugger Display
  1261.  
  1262.      ------------------------------------------------------------------
  1263.  
  1264.           In This Chapter                   3-1
  1265.           
  1266.           The Debugger Windows              3-1
  1267.           
  1268.           Dialog Boxes                      3-11
  1269.           
  1270.           The Debugger Menus                3-11
  1271.           
  1272.           The Function Keys                 3-28
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.          Chapter 3 -- The Debugger Display
  1326.  
  1327.          Before you can make full use of The Clipper Debugger, you
  1328.          must be familiar with the various windows, menus and function
  1329.          keys on which the debugging environment is based.  This
  1330.          chapter provides an explanation and illustration of each of
  1331.          these components.
  1332.  
  1333.  
  1334.       -----------------------------------------------------------------
  1335.       In This Chapter
  1336.  
  1337.          This chapter describes each of the windows, boxes, menus and
  1338.          keys that constitute the main display.  The topics covered
  1339.          are:
  1340.  
  1341.          *  The Debugger windows
  1342.  
  1343.          *  Dialog boxes
  1344.  
  1345.          *  The Debugger menus
  1346.  
  1347.          *  Function keys
  1348.  
  1349.  
  1350.       -----------------------------------------------------------------
  1351.       The Debugger Windows
  1352.  
  1353.          The Debugger display is based on a series of windows, each
  1354.          with a unique purpose.  The following table gives the name
  1355.          and a brief description of each of these windows:
  1356.  
  1357.          Table 3-1: The Debugger Windows
  1358.          --------------------------------------------------------------
  1359.          Window Name             Purpose
  1360.          --------------------------------------------------------------
  1361.          Callstack Window        Display the Callstack
  1362.          Code Window             Display program code
  1363.          Command Window          Display commands and their results
  1364.          Help Window             Display help information
  1365.          Monitor Window          Display monitored variables
  1366.          Set Color Window        Display and modify color settings
  1367.          View Sets Window        Display and modify SET values
  1368.          View Work Area Window   Display work area and (.dbf)
  1369.                                  information
  1370.          Watch Window            Display Watchpoints and Tracepoints
  1371.          --------------------------------------------------------------
  1372.          
  1373.          Windows are used to display program code, enter commands and
  1374.          offer help.  The following sections explain the various
  1375.          windows and their functions.
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.                                            The Debugger Display    3-1
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.       Window Operations
  1392.  
  1393.          This section describes the general behavior of windows that
  1394.          appear on the main Debugger screen (i.e., Code, Command,
  1395.          Monitor, Watch, and Callstack), including the processes of
  1396.          sizing and moving between windows.
  1397.  
  1398.  
  1399.          --------------------------------------------------------------
  1400.          Navigating Between Windows
  1401.  
  1402.          Of all the windows on the main screen, one is said to be the
  1403.          active window and the rest are inactive.  When you select a
  1404.          window, you make it the active window.  The active window is
  1405.          indicated by a highlighted border; inactive windows have a
  1406.          single-line border.  To move back and forth between windows,
  1407.          use Tab and Shift-Tab.
  1408.  
  1409.          Tab selects the next window on the screen.  Shift-Tab selects
  1410.          the previous window.  These keystrokes are equivalent to the
  1411.          Next and Prev selections in the Windows menu.  The order of
  1412.          the windows is as follows: Code, Monitor, Watch, Callstack,
  1413.          Command.
  1414.  
  1415.          When a window is active, any valid keystrokes affect only
  1416.          that window.  For example, when the Monitor Window is active,
  1417.          pressing Dnarrow moves the highlight bar to the next variable
  1418.          in the list of monitored variables, but does not affect the
  1419.          cursor or highlight bar in any other window.
  1420.  
  1421.          The exception to this rule is that a command can be typed and
  1422.          executed from any active window.  For example if you type
  1423.          "LIST BP" while the Code Window is active, the command will
  1424.          appear in the Command Window next to the > prompt as you are
  1425.          typing.  As soon as you press Return, the command will be
  1426.          executed and the result displayed in the Command Window. 
  1427.          Furthermore, Return always executes the command pending in
  1428.          the Command Window (if any), taking precedence over the
  1429.          normal operation of the Return key for the active window.
  1430.  
  1431.  
  1432.          --------------------------------------------------------------
  1433.          Iconizing
  1434.  
  1435.          Any window on the screen can be effectively put out of sight
  1436.          without actually closing the window.  For example, if the
  1437.          Callstack Window is open and you are not interested in its
  1438.          contents for the moment, you could shrink it down so small
  1439.          that only the window name would be visible.
  1440.  
  1441.          This process, called iconizing, is accomplished by selecting
  1442.          the Window:Iconize menu option.  The active window is
  1443.          replaced by an icon (its name), and you can no longer see the
  1444.          contents of the window.  When a window is iconized, certain
  1445.          window operations, such as sizing, are not available.
  1446.  
  1447.  
  1448.  
  1449.  
  1450.                                            The Debugger Display    3-2
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.          --------------------------------------------------------------
  1458.          Zooming
  1459.  
  1460.          To zoom the active window to full screen, simply press F2. 
  1461.          When a window is zoomed, other window operations such as
  1462.          moving and sizing are not allowed.
  1463.  
  1464.          F2 acts as a toggle between the full screen and window
  1465.          display modes so that when the active window is zoomed to
  1466.          full screen, pressing F2 resumes the original window
  1467.          display.  F2 is equivalent to the Windows:Zoom menu option.  
  1468.  
  1469.  
  1470.          --------------------------------------------------------------
  1471.          Sizing
  1472.  
  1473.          The height and width of all Debugger windows is determined by
  1474.          the display mode and which windows are open at any given
  1475.          time.  The size of a window, however, can be changed to suit
  1476.          your particular needs.  The following table lists some
  1477.          shortcut keys for changing the height of a window:
  1478.  
  1479.          Table 3-2: Sizing Windows
  1480.          --------------------------------------------------------------
  1481.          Key      Action
  1482.          --------------------------------------------------------------
  1483.          Alt-G    Grow active window by one line
  1484.          Alt-S    Shrink active window by one line
  1485.          Alt-D    Shrink Command Window by one line
  1486.          Alt-U    Grow Command Window by one line
  1487.          --------------------------------------------------------------
  1488.          
  1489.          The Windows:Size menu option allows you to change both the
  1490.          height and the width of the active window.  When you select
  1491.          this option, the border of the active window changes to a
  1492.          different pattern and the cursor keys are used to change the
  1493.          size of the window.  Return completes the sizing.
  1494.  
  1495.          --------------------------------------------------------------
  1496.          Note
  1497.  
  1498.          Windows cannot be sized if you are running the Debugger in
  1499.          split screen mode.
  1500.          --------------------------------------------------------------
  1501.  
  1502.  
  1503.          --------------------------------------------------------------
  1504.          Moving
  1505.  
  1506.          The location of all Debugger windows is determined by the
  1507.          display mode and which windows are open at any given time and
  1508.          can be changed to suit your particular needs.
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.                                            The Debugger Display    3-3
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.          The Windows:Move menu option allows you to move the active
  1524.          window around on the screen.  When you select this option,
  1525.          the border of the active window changes to a different
  1526.          pattern and the cursor keys are used to move the window. 
  1527.          Return completes the move.
  1528.  
  1529.          --------------------------------------------------------------
  1530.          Note
  1531.  
  1532.          Windows cannot be moved if you are running the Debugger in
  1533.          split screen mode.
  1534.          --------------------------------------------------------------
  1535.  
  1536.  
  1537.          --------------------------------------------------------------
  1538.          Tiling Windows
  1539.  
  1540.          The Windows:Tile option is a quick way to clean up the
  1541.          screen.  This option restores each window on the screen to
  1542.          its default location and size.  Any windows that have been
  1543.          zoomed or iconized are also restored to the original window
  1544.          display mode.
  1545.  
  1546.  
  1547.       The Code Window
  1548.  
  1549.          The Code Window is located underneath the Menu Bar, and is
  1550.          used to display program code and header (.ch) files. 
  1551.          Pre-processed output can be displayed beneath program code on
  1552.          a line-by-line basis using the Options:Preprocessed Code menu
  1553.          option.  The name of the file currently being displayed is
  1554.          shown at the top of the window.
  1555.  
  1556.          The Code Window is initially set to display a certain number
  1557.          of lines, but can be sized to display fewer or more lines
  1558.          (see Sizing Windows in this chapter for more information). 
  1559.          The minimum number of display lines is zero, and the initial
  1560.          and maximum number of lines depend on the display mode.
  1561.  
  1562.          Inside the Code Window is a highlight bar called the
  1563.          Execution Bar which is positioned on the line of code about
  1564.          to be executed.  The Execution Bar moves as execution
  1565.          continues.
  1566.  
  1567.          When the Code Window is active, the cursor appears in the
  1568.          window to indicate your current position in the file being
  1569.          viewed.  Initially the cursor and Execution Bar appear on the
  1570.          same line, but the cursor can be moved up and down using the
  1571.          cursor keys.  The cursor is used to show the result of Locate
  1572.          menu selections, to mark (or delete) a line of code as a
  1573.          Breakpoint, and to tell the Run:To Cursor menu option where
  1574.          to stop.
  1575.  
  1576.          To navigate within the Code Window, use the keys shown in the
  1577.          table below:
  1578.  
  1579.  
  1580.  
  1581.  
  1582.                                            The Debugger Display    3-4
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.          Table 3-3: Code Window Active Keys
  1590.          --------------------------------------------------------------
  1591.          Key                  Action
  1592.          --------------------------------------------------------------
  1593.          Uparrow/Ctrl-E       Move cursor up one line
  1594.          Dnarrow/Ctrl-X       Move cursor down one line
  1595.          Leftarrow/Ctrl-S     Pan left one character
  1596.          Rightarrow/Ctrl-D    Pan right one character
  1597.          Home/Ctrl-A          Pan left one screen
  1598.          End/Ctrl-F           Pan right one screen
  1599.          PgUp/Ctrl-R          Scroll window contents up
  1600.          PgDn/Ctrl-C          Scroll window contents down
  1601.          Ctrl-PgUp            Move cursor to first line
  1602.          Ctrl-PgDn            Move cursor to last line
  1603.          Return               Execute pending command
  1604.          Tab                  Activate next window
  1605.          Shift-Tab            Activate previous window
  1606.          F2                   Toggle full screen/window display
  1607.          --------------------------------------------------------------
  1608.  
  1609.  
  1610.       The Command Window
  1611.  
  1612.          The Command Window displayed at the bottom of the screen
  1613.          displays the Debugger commands that you enter.  The output of
  1614.          Debugger commands (if any) is also displayed in this window
  1615.          directly underneath the command.  Commands are entered by
  1616.          typing the command and pressing Return to execute it (see
  1617.          Chapter 5, Command Reference for a list of commands).
  1618.  
  1619.          The Command Window is like most other Debugger windows in
  1620.          that it can be sized, moved, and zoomed to full screen when
  1621.          it is the active window (see Sizing Windows in this chapter
  1622.          for more information).  The window is made active by
  1623.          selecting it with Tab or Shift-Tab.  When the Command Window
  1624.          is active, its border is highlighted.
  1625.  
  1626.          Note, however, that the Command Window does not have to be
  1627.          active in order to enter commands.  Commands are entered in
  1628.          the same manner no matter what window happens to be active at
  1629.          the time, and the command appears in the Command Window next
  1630.          to the greater than (>) prompt as you are typing.  The
  1631.          following table gives a summary of keys that are available
  1632.          when the Command Window is active:
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.                                            The Debugger Display    3-5
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.          Table 3-4: Command Window Active Keys
  1656.          --------------------------------------------------------------
  1657.          Key                  Action
  1658.          --------------------------------------------------------------
  1659.          Uparrow/Ctrl-E       Move cursor to previous line in history
  1660.          Dnarrow/Ctrl-X       Move cursor to next line in history
  1661.          Leftarrow/Ctrl-S     Move cursor one character to the left
  1662.          Rightarrow/Ctrl-D    Move cursor one character to the right
  1663.          Home/Ctrl-A          Move cursor to the beginning of line
  1664.          End/Ctrl-F           Move cursor to the end of line
  1665.          Ins/Ctrl-V           Toggle the insert mode on or off
  1666.          Del/Ctrl-G           Delete character under cursor
  1667.          Backspace/Ctrl-H     Delete character to the left of cursor
  1668.          Esc                  Clear command line
  1669.          Return               Execute pending command
  1670.          Tab                  Activate next window
  1671.          Shift-Tab            Activate previous window
  1672.          F2                   Toggle full screen/window display
  1673.          --------------------------------------------------------------
  1674.  
  1675.  
  1676.          --------------------------------------------------------------
  1677.          History
  1678.  
  1679.          The commands that you enter are saved in a history buffer
  1680.          where they can be accessed when the Command Window is
  1681.          active.  Use Uparrow to move to the previous command and
  1682.          Dnarrow to move to the next one.  F2 zooms the Command Window
  1683.          to full screen, allowing you to see more commands at one
  1684.          time.  When a command is displayed next to the > prompt in
  1685.          the Command Window, it can be edited and executed just as if
  1686.          you had typed it.
  1687.  
  1688.  
  1689.          --------------------------------------------------------------
  1690.          Overwrite and Insert Modes
  1691.  
  1692.          When the Command Window is active, there are two data entry
  1693.          modes: Overwrite and Insert.  Overwrite mode (the default) is
  1694.          indicated by the underscore cursor and causes any characters
  1695.          typed to overwrite existing characters.  To toggle between
  1696.          Overwrite and Insert mode, press Ins.  The cursor changes to
  1697.          a block and new characters are inserted to the right of the
  1698.          cursor position.
  1699.  
  1700.  
  1701.       The Watch Window
  1702.  
  1703.          The Watch Window is displayed at the top of the screen,
  1704.          underneath the Menu Bar and above the Code Window.  It
  1705.          appears whenever a Watchpoint or Tracepoint is created.  In
  1706.          this window, the number and name of each Watchpoint and
  1707.          Tracepoint is displayed along with its data type, value, and
  1708.          storage class (e.g., LOCAL).  Watchpoints and Tracepoints are
  1709.          indicated by the words "wp" or "tp."
  1710.  
  1711.  
  1712.  
  1713.  
  1714.                                            The Debugger Display    3-6
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.          When the Watch Window is active, you can inspect the value of
  1722.          almost any variable or expression that appears in the window
  1723.          by highlighting it and pressing Return.  This action opens a
  1724.          dialog box in which you can inspect (and edit) the value. 
  1725.          Pressing Return takes you back to the Watch Window.
  1726.  
  1727.          Code blocks and objects, however, cannot be inspected and
  1728.          inspecting an array is slightly more complicated.  To inspect
  1729.          an array, highlight the array name and select it with
  1730.          Return.  When the dialog box appears, you can either enter
  1731.          array values or press Return again to inspect each element of
  1732.          the array in another dialog box.
  1733.  
  1734.          In this dialog box, Uparrow and Dnarrow move the highlight
  1735.          bar and Return enters the edit mode for the current value. 
  1736.          After making changes, press Return again to leave the edit
  1737.          mode.  When you are finished making changes, press Esc twice
  1738.          to return to the Watch Window and the changes you have made
  1739.          to the array will be saved.
  1740.  
  1741.          The following table summarizes the keys that are available
  1742.          when the Watch Window is active:
  1743.  
  1744.          Table 3-5: Watch and Monitor Window Active Keys
  1745.          --------------------------------------------------------------
  1746.          Key               Action
  1747.          --------------------------------------------------------------
  1748.          Uparrow/Ctrl-E    Move highlight bar up one line
  1749.          Dnarrow/Ctrl-X    Move highlight bar down one line
  1750.          PgUp/Ctrl-R       Scroll window contents up
  1751.          PgDn/Ctrl-C       Scroll window contents down
  1752.          Ctrl-PgUp         Move highlight bar to first line
  1753.          Ctrl-PgDn         Move highlight bar to last line
  1754.          Return            Execute pending command or change selected
  1755.                            item
  1756.          Tab               Activate next window
  1757.          Shift-Tab         Activate previous window
  1758.          F2                Toggle full screen/window display
  1759.          --------------------------------------------------------------
  1760.          
  1761.          See also: Point:Watchpoint, Point:Tracepoint, DELETE, LIST,
  1762.          TP, WP
  1763.  
  1764.  
  1765.       The Monitor Window
  1766.  
  1767.          The Monitor Window is similar to the Watch Window except that
  1768.          it is used to monitor variables of a particular storage class
  1769.          rather than variables that are set as Watchpoints and
  1770.          Tracepoints.  The Monitor Window appears on the screen only
  1771.          when one or more of the storage classes in the Monitor menu
  1772.          is turned ON (indicated by a check mark next to the storage
  1773.          class).
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.                                            The Debugger Display    3-7
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.          If the Callstack window is active, the Monitor window
  1788.          displays variables at the point of the activation level
  1789.          represented by the highlight bar in the Callstack.
  1790.  
  1791.          In this window, each variable name that is being monitored is
  1792.          displayed along with its storage class, data type, and
  1793.          value.  By default, the variables are grouped by storage
  1794.          class.  If Monitor:Sort is ON (indicated by a check mark
  1795.          beside the menu option), variables listed in the Monitor
  1796.          window are displayed in alphabetical order by variable name.
  1797.  
  1798.          When the Monitor Window is active, you can change the value
  1799.          of almost any variable in the window by highlighting it and
  1800.          pressing Return.  Editing variables in this window is
  1801.          identical to the method described above for the Watch Window
  1802.          and with the same exceptions--code blocks and objects cannot
  1803.          be edited and editing array values is slightly more
  1804.          complicated than other data types.  The keys for this window
  1805.          are the same as for the Watch Window and are summarized in
  1806.          Table 3-5.
  1807.  
  1808.          See also: Monitor:Local, Monitor:Private, Monitor:Public,
  1809.          Monitor:Static, Monitor:Sort
  1810.  
  1811.  
  1812.       The Callstack Window
  1813.  
  1814.          The Callstack Window appears on the right-hand side of the
  1815.          screen and contains the names of all pending activations. 
  1816.          This list is called the Callstack.  The current activation is
  1817.          always at the top of the Callstack.
  1818.  
  1819.          To open the Callstack Window, select the View:Callstack menu
  1820.          option or use the CALLSTACK command.  To select the window,
  1821.          press Tab or Shift-Tab until it is highlighted.  The
  1822.          following is a list of keys available when the Callstack
  1823.          Window is active:
  1824.  
  1825.          Table 3-6: Callstack Window Active Keys
  1826.          --------------------------------------------------------------
  1827.          Key               Action
  1828.          --------------------------------------------------------------
  1829.          Uparrow/Ctrl-E    Move highlight bar up one line
  1830.          Dnarrow/Ctrl-X    Move highlight bar down one line
  1831.          PgUp/Ctrl-R       Scroll window contents up
  1832.          PgDn/Ctrl-C       Scroll window contents down
  1833.          Ctrl-PgUp         Move highlight bar to first line
  1834.          Ctrl-PgDn         Move highlight bar to last line
  1835.          Return            Execute pending command
  1836.          Tab               Activate next window
  1837.          Shift-Tab         Activate previous window
  1838.          F2                Toggle full screen/window display
  1839.          --------------------------------------------------------------
  1840.          
  1841.          See also: View:Callstack, CALLSTACK
  1842.  
  1843.  
  1844.  
  1845.  
  1846.                                            The Debugger Display    3-8
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.       The Help Window
  1854.  
  1855.          The Debugger offers on-line help in the form of a Help
  1856.          Window, which is divided into two panes: the left pane
  1857.          contains a list of topics for which help is available, and
  1858.          the right pane contains the help text for the currently
  1859.          highlighted topic.  You can activate the Help Window by using
  1860.          the Help menu, pressing F1, or entering the HELP command.
  1861.          
  1862.          There are several main topics of discussion in the Help
  1863.          Window and when the window is first activated, one of these
  1864.          topics is highlighted on the left with its associated help
  1865.          text displayed on the right.  The following table summarizes
  1866.          the keys used to navigate within the Help Window:
  1867.  
  1868.          Table 3-7: Help Window Active Keys
  1869.          --------------------------------------------------------------
  1870.          Key               Action
  1871.          --------------------------------------------------------------
  1872.          Uparrow/Ctrl-E    Move highlight bar up one line
  1873.          Dnarrow/Ctrl-X    Move highlight bar down one line
  1874.          PgUp/Ctrl-R       Scroll window contents up
  1875.          PgDn/Ctrl-C       Scroll window contents down
  1876.          Esc               Leave Help Window
  1877.          --------------------------------------------------------------
  1878.          
  1879.          See also: F1, Help:Commands, Help:Keys, Help:Menus,
  1880.          Help:Windows, HELP
  1881.  
  1882.  
  1883.       The View Sets Window
  1884.  
  1885.          To activate the View Sets Window, select the View:Sets menu
  1886.          option.  When this window is active, you can view and change
  1887.          the status of the Clipper system settings.
  1888.  
  1889.          Uparrow and Dnarrow move the highlight up and down in the
  1890.          list of settings.  To change a setting, highlight it and
  1891.          press Return.  After changing the value, press Return again
  1892.          and move on to the next setting.
  1893.  
  1894.          To close the View Sets Window and continue debugging, press
  1895.          Esc.  The new settings are saved and take effect immediately
  1896.          in your program.
  1897.  
  1898.          See also: View:Sets
  1899.  
  1900.  
  1901.       The View Workareas Window
  1902.  
  1903.          To activate the View Workareas Window, select the
  1904.          View:Workareas menu option or press F6.  This window is
  1905.          divided into three panes called Area, Status, and Structure. 
  1906.          The Tab and Shift-Tab keys move back and forth between window
  1907.          panes.
  1908.  
  1909.  
  1910.  
  1911.  
  1912.                                            The Debugger Display    3-9
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.          The Area pane displays the alias name for each open database
  1920.          file, with the active file displayed in angle brackets. 
  1921.          Uparrow and Dnarrow are used to move the highlight up and
  1922.          down in the Area window pane.  Information regarding the
  1923.          currently highlighted file is shown in the other two window
  1924.          panes.
  1925.  
  1926.          The Status pane shows the status of most work area flag
  1927.          settings with information regarding the selected database
  1928.          file underneath.  When this pane is active, the alias name is
  1929.          highlighted and Uparrow and Dnarrow are used to move the
  1930.          highlight.  The database information is in the form of an
  1931.          outline that can be expanded and collapsed by pressing
  1932.          Return.  For instance, if you highlight Current Record and
  1933.          press Return the value of each field in the current record is
  1934.          displayed underneath.  Similarly, expanding the Workarea
  1935.          Information heading displays additional work area settings
  1936.          that are not shown at the top of the window pane.
  1937.  
  1938.          Finally, the Structure pane lists the structure of the
  1939.          selected database file.  When this window pane is active,
  1940.          Uparrow and Dnarrow move the highlight from field to field
  1941.          allowing you to scroll through the file structure.
  1942.  
  1943.          To close the View Workareas Window and continue debugging,
  1944.          press Esc.
  1945.  
  1946.          See also: F6, View:Workareas
  1947.  
  1948.  
  1949.       The Set Colors Window
  1950.  
  1951.          To activate the Set Colors Window, select the Options:Colors
  1952.          menu option.  When this window is active, you can view and
  1953.          change the status of the Debugger color settings.
  1954.  
  1955.          Uparrow and Dnarrow move the highlight up and down in the
  1956.          list of color settings.  To change a setting, highlight it
  1957.          and press Return.  Each setting is a foreground/background
  1958.          color string enclosed in double quotes (see SETCOLOR() in the
  1959.          Reference book for a list of colors).  After changing the
  1960.          value, press Return again and move on to the next setting.
  1961.  
  1962.          To close the Set Colors Window and continue debugging, press
  1963.          Esc.  The new colors will take effect immediately but will be
  1964.          lost as soon as you exit the Debugger.  To save the new
  1965.          colors in a script file for future use, select the
  1966.          Options:Save Settings menu option.
  1967.  
  1968.          See also: Options:Colors, Options:Restore Settings,
  1969.          Options:Save Settings
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.                                           The Debugger Display    3-10
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.       -----------------------------------------------------------------
  1986.       Dialog Boxes
  1987.  
  1988.          Several menu options and window selections require that you
  1989.          enter further information before continuing.  Menu options
  1990.          that require more input are always indicated by an ellipsis
  1991.          (...) to the right of the option name.  Some examples of
  1992.          window selections that require additional information are
  1993.          items in the Monitor and Watch windows.  Anytime more
  1994.          information is required to proceed, a dialog box is displayed
  1995.          to prompt you.
  1996.  
  1997.          The following table summarizes the keys that are available
  1998.          when a dialog box is open:
  1999.  
  2000.          Table 3-8: Dialog Box Active Keys
  2001.          --------------------------------------------------------------
  2002.          Key                  Action
  2003.          --------------------------------------------------------------
  2004.          Leftarrow/Ctrl-S     Move cursor one character to the left
  2005.          Rightarrow/Ctrl-D    Move cursor one character to the right
  2006.          Home/Ctrl-A          Move cursor to the beginning of line
  2007.          End/Ctrl-F           Move cursor to the end of line
  2008.          Ins/Ctrl-V           Toggle the insert mode on or off
  2009.          Del/Ctrl-G           Delete character under cursor
  2010.          Backspace/Ctrl-H     Delete character to the left of cursor
  2011.          Esc                  Close dialog box without executing
  2012.          Return               Execute and close dialog box
  2013.          --------------------------------------------------------------
  2014.          
  2015.          Dialog boxes are also used if you enter an incomplete
  2016.          command.  For example, FIND with no search string opens a
  2017.          dialog box to ask for the search string.
  2018.  
  2019.  
  2020.       -----------------------------------------------------------------
  2021.       The Debugger Menus
  2022.  
  2023.          The following section contains a description of the menus
  2024.          available in The Clipper Debugger.  Many of the options on
  2025.          these menus can also be accessed by using function keys or
  2026.          commands; in such cases, the appropriate command or function
  2027.          key is mentioned in the description of the menu option.
  2028.  
  2029.  
  2030.       The Menu Bar
  2031.  
  2032.          Menu selections appear on the Menu Bar at the top of the
  2033.          screen.  Each of these menus contains a group of similar,
  2034.          commonly used options.  For example, the Find, Next, Previous
  2035.          and Goto Line options are found on the Locate menu.
  2036.  
  2037.          Although each of these options has an associated command that
  2038.          performs the same function (in the above example: FIND, NEXT,
  2039.          PREV and GOTO), the menu system provides a quick way for the
  2040.          beginner to learn how to use the Debugger.
  2041.  
  2042.  
  2043.  
  2044.                                           The Debugger Display    3-11
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.       Menu Operations
  2052.  
  2053.          This section describes the process of accessing menus and
  2054.          selecting particular menu options.  Also included are tables
  2055.          of menu system active keys.
  2056.  
  2057.  
  2058.          --------------------------------------------------------------
  2059.          Accessing a Menu
  2060.  
  2061.          To access a menu, hold down the Alt key and press the first
  2062.          letter of the menu name.  For example, to access the View
  2063.          menu, press Alt-V.  To cancel a menu, press Esc.
  2064.  
  2065.          Whenever a menu is displayed on the screen, the other menus
  2066.          can be accessed by using Leftarrow and Rightarrow (as shown
  2067.          in the table below).  If you are positioned at the first item
  2068.          on the Menu Bar--the File menu--pressing Leftarrow causes the
  2069.          cursor to "wrap-around" and display the last item--the Help
  2070.          menu.  The reverse is true if you press Rightarrow from the
  2071.          last item.
  2072.  
  2073.          Table 3-9: Menu Access Keys
  2074.          --------------------------------------------------------------
  2075.          Key                        Action
  2076.          --------------------------------------------------------------
  2077.          Alt-<Menu first letter>    Activate designated menu
  2078.          Leftarrow/Ctrl-S           Activate menu to the left; wrap if
  2079.                                     on first menu
  2080.          Rightarrow/Ctrl-D          Activate menu to the right; wrap
  2081.                                     if on last menu
  2082.          Esc                        Close menu
  2083.          --------------------------------------------------------------
  2084.  
  2085.  
  2086.          --------------------------------------------------------------
  2087.          Selecting a Menu Option
  2088.  
  2089.          Once inside a menu, Uparrow and Dnarrow move the highlight
  2090.          bar up and down the list of options.  To select an option,
  2091.          highlight it and press Return.
  2092.  
  2093.          When selecting a menu option, pressing Uparrow on the first
  2094.          option causes the highlight bar to wrap-around to the last
  2095.          option; the reverse is true if you press Dnarrow on the last
  2096.          option.  The following table lists the active keys within a
  2097.          menu:
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.                                           The Debugger Display    3-12
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.          Table 3-10: Menu Option Keys
  2118.          --------------------------------------------------------------
  2119.          Key               Action
  2120.          --------------------------------------------------------------
  2121.          <Option letter>   Select designated option
  2122.          Return            Select highlighted option
  2123.          Uparrow/Ctrl-E    Move highlight bar up one option; 
  2124.                            wrap if on first option
  2125.          Dnarrow/Ctrl-X    Move highlight bar down one option; 
  2126.                            wrap if on last option
  2127.          --------------------------------------------------------------
  2128.  
  2129.  
  2130.          --------------------------------------------------------------
  2131.          Accelerator Keys
  2132.  
  2133.          Once a menu is open, all options within the menu have an
  2134.          associated accelerator key that you can press to select the
  2135.          option.  The accelerator key is a single letter which is
  2136.          usually the first letter of the option name.
  2137.  
  2138.          Within a menu, the accelerator key for each option is
  2139.          highlighted within the option name.  Typing the indicated key
  2140.          is equivalent to moving the highlight to that option and
  2141.          pressing Return.  For example, pressing Alt-P followed by the
  2142.          letter B selects Point:Breakpoint.
  2143.  
  2144.  
  2145.          --------------------------------------------------------------
  2146.          Menu Commands
  2147.  
  2148.          Any menu option can be turned into a command that can be
  2149.          executed from the Command Window or a script file.  These
  2150.          commands, called menu commands, are formed using the menu
  2151.          name followed by the first word of the option name.  For
  2152.          example, the Monitor:Public menu option can be executed using
  2153.          the following command:
  2154.  
  2155.          > MONITOR PUBLIC <Return>
  2156.          
  2157.          Arguments can be specified following a menu command if the
  2158.          menu option requires further input.  For example, selecting
  2159.          Run:Speed prompts you for the step delay using a dialog box. 
  2160.          To specify the delay speed of .5 seconds using a menu
  2161.          command:
  2162.  
  2163.          > RUN SPEED 5 <Return>
  2164.          
  2165.          Menu commands can be abbreviated down to one letter per word,
  2166.          but in some cases a second letter is required in the option
  2167.          keyword to distinguish it from another option that begins
  2168.          with the same letter.
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.                                           The Debugger Display    3-13
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.       The File Menu
  2184.  
  2185.          The File menu contains options to view other files, and
  2186.          allows you to access DOS without leaving the current
  2187.          program.  It is opened by pressing Alt-F.
  2188.  
  2189.  
  2190.          --------------------------------------------------------------
  2191.          Open...
  2192.  
  2193.          The Open option allows you to examine another program or
  2194.          header file.  When you select this option, a dialog box is
  2195.          displayed and you are prompted to enter the name of the file
  2196.          you want to view.  If no extension is specified, (.prg) is
  2197.          assumed.  When you have entered the name of the file, the
  2198.          current program is cleared from the Code Window, and the new
  2199.          file is displayed in its place.  To continue with the
  2200.          original program, select the File:Resume menu option or use
  2201.          the RESUME command.
  2202.  
  2203.          See also: File:Resume, VIEW
  2204.  
  2205.  
  2206.          --------------------------------------------------------------
  2207.          Resume
  2208.  
  2209.          The Resume option clears the file currently being viewed from
  2210.          the screen and redisplays the program originally being
  2211.          debugged.
  2212.  
  2213.          See also: File:Open, RESUME
  2214.  
  2215.  
  2216.          --------------------------------------------------------------
  2217.          DOS Access
  2218.  
  2219.          This option allows you to access DOS without leaving the
  2220.          Debugger.  The screen is cleared and a temporary copy of
  2221.          COMMAND.COM is invoked, allowing you to type DOS commands in
  2222.          the usual way.  When you have finished, type "Exit" at the
  2223.          DOS prompt to return to the program you are debugging.
  2224.  
  2225.          See also: DOS
  2226.  
  2227.  
  2228.          --------------------------------------------------------------
  2229.          Exit
  2230.  
  2231.          Selecting the Exit option tells the Debugger that you have
  2232.          finished the current debugging session.  All Debugger
  2233.          settings are cleared, database and index files are closed,
  2234.          and the system returns to DOS.  Pressing Alt-X is equivalent
  2235.          to selecting File:Exit.
  2236.  
  2237.          See also: QUIT
  2238.  
  2239.  
  2240.  
  2241.  
  2242.                                           The Debugger Display    3-14
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.       The Locate Menu
  2250.  
  2251.          The Locate menu contains options that allow you to search for
  2252.          a character string in a program and move the cursor in the
  2253.          Code Window to a particular line number.  This menu is
  2254.          selected by pressing Alt-L.
  2255.  
  2256.          --------------------------------------------------------------
  2257.          Note
  2258.  
  2259.          If the Command Window is active when a Locate menu option is
  2260.          selected, you will not see the cursor move to its new
  2261.          location in the Code Window.  You must select the Code Window
  2262.          in order to see the new cursor position in the file.
  2263.          --------------------------------------------------------------
  2264.  
  2265.  
  2266.          --------------------------------------------------------------
  2267.          Find...
  2268.  
  2269.          The Find option searches the file displayed in the Code
  2270.          Window for a particular character string.  When selected, a
  2271.          dialog box is displayed and you are asked to enter a search
  2272.          string.  
  2273.  
  2274.          The search always begins at the first line of code and moves
  2275.          down through the file, regardless of the current cursor
  2276.          position in the Code Window.  If a match is found, the
  2277.          Debugger moves the cursor to the line containing the first
  2278.          occurrence of the string; otherwise, the cursor remains at
  2279.          its current location.
  2280.  
  2281.          See also: Locate:Next, Locate:Previous, Locate:Case
  2282.          Sensitive, FIND
  2283.  
  2284.  
  2285.          --------------------------------------------------------------
  2286.          Next
  2287.  
  2288.          This option searches for the next occurrence of the last
  2289.          character string found.  If no search string has been
  2290.          specified, a dialog box is displayed to prompt you for one.
  2291.  
  2292.          The search begins at the current cursor position in the Code
  2293.          Window and moves down through the file.  If a match is found,
  2294.          the Debugger moves the cursor to the line containing the next
  2295.          occurrence of the string; otherwise, the cursor remains at
  2296.          its current location.
  2297.  
  2298.          See also: Locate:Find, Locate:Previous, NEXT
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.                                           The Debugger Display    3-15
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.          --------------------------------------------------------------
  2316.          Previous
  2317.  
  2318.          The Previous option searches for the previous occurrence of a
  2319.          character string.  If no search string has been specified, a
  2320.          dialog box is displayed to prompt you for one.
  2321.  
  2322.          The search begins at the current cursor position in the Code
  2323.          Window and moves up through the file.  If a match is found,
  2324.          the Debugger moves the cursor to the line containing the
  2325.          previous occurrence of the string; otherwise, the cursor
  2326.          remains at its current location.
  2327.  
  2328.          See also: Locate:Find, Locate:Next, PREV
  2329.  
  2330.  
  2331.          --------------------------------------------------------------
  2332.          Goto Line...
  2333.  
  2334.          Goto Line moves the cursor to a particular line number.  When
  2335.          you select this option, a dialog box is displayed and you are
  2336.          prompted to enter a line number.  If your entry is valid, the
  2337.          Debugger moves the cursor to the indicated line; otherwise,
  2338.          the cursor remains at its current location.
  2339.  
  2340.          Locate:Goto Line is functional regardless of whether or not
  2341.          Line Numbers are currently displayed.
  2342.  
  2343.          See also: Options:Line Numbers, GOTO
  2344.  
  2345.  
  2346.          --------------------------------------------------------------
  2347.          Case Sensitive
  2348.  
  2349.          The setting of this option determines whether or not searches
  2350.          performed with the Find, Next, and Previous options in the
  2351.          Locate menu are case sensitive.  If Case Sensitive is ON
  2352.          (indicated by a check mark), two strings match only if they
  2353.          have an identical pattern of upper and lower case letters. 
  2354.          If it is OFF, two strings containing identical characters
  2355.          match, regardless of the casing of letters within the
  2356.          strings.
  2357.  
  2358.          The Case Sensitive setting also applies to searches performed
  2359.          with the FIND, NEXT, and PREV commands.
  2360.  
  2361.          See also: Locate:Find, Locate:Next, Locate:Previous, FIND,
  2362.          NEXT, PREV
  2363.  
  2364.  
  2365.       The View Menu
  2366.  
  2367.          The View menu, selected by pressing Alt-V, contains a set of
  2368.          options that allow you to view certain information that is
  2369.          not normally displayed as part of the Debugger screen.
  2370.  
  2371.  
  2372.  
  2373.  
  2374.                                           The Debugger Display    3-16
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.          --------------------------------------------------------------
  2382.          Sets
  2383.  
  2384.          When you select this option, the View Sets Window is
  2385.          activated.  When this window is active, you can view and
  2386.          change the status of the Clipper system settings.
  2387.  
  2388.          Use Uparrow and Dnarrow to move the highlight up and down in
  2389.          the list of settings.  To change a setting, highlight it and
  2390.          press Return.  After changing the value, press Return again
  2391.          and move on to the next setting.
  2392.  
  2393.          To close the View Sets Window and continue debugging, press
  2394.          Esc.  The new settings are saved and take effect immediately
  2395.          in your program.
  2396.  
  2397.  
  2398.          --------------------------------------------------------------
  2399.          Workareas
  2400.  
  2401.          Selecting this option activates the View Workareas Window. 
  2402.          Pressing F6 has the same effect.  This window allows you to
  2403.          view information regarding all database files that are
  2404.          currently in use.  To close the window and continue
  2405.          debugging, press Esc.
  2406.  
  2407.          See also: F6
  2408.  
  2409.  
  2410.          --------------------------------------------------------------
  2411.          App Screen
  2412.  
  2413.          When you select this option, the Debugger screen is erased,
  2414.          and your application screen is displayed in its place.  This
  2415.          allows you to see the output of the program being debugged
  2416.          exactly as the person using your application will see it. 
  2417.          Pressing F4 achieves the same effect.  To return to the
  2418.          Debugger, press any key.
  2419.  
  2420.          See also: F4, OUTPUT
  2421.  
  2422.  
  2423.          --------------------------------------------------------------
  2424.          Callstack
  2425.  
  2426.          The Callstack option acts as a toggle for opening and closing
  2427.          the Callstack Window.  When the option is ON (indicated by a
  2428.          check mark next to the menu option), the Callstack Window is
  2429.          displayed on the main Debugger screen.  If the option OFF,
  2430.          the Callstack Window is closed (not displayed).
  2431.  
  2432.          See also: CALLSTACK
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.                                           The Debugger Display    3-17
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.       The Run Menu
  2448.  
  2449.          The options found on the Run menu allow you to restart the
  2450.          current application, load a new (.EXE) file, or step through
  2451.          code one line at a time at a specified speed.  This menu is
  2452.          selected by pressing Alt-R.
  2453.  
  2454.  
  2455.          --------------------------------------------------------------
  2456.          Restart
  2457.  
  2458.          The Restart option reloads the current application, retaining
  2459.          all Debugger settings.  The Debugger does not allow portions
  2460.          of an application which have already been executed to be run
  2461.          again.  Instead, the entire application must be restarted.
  2462.  
  2463.          See also: RESTART
  2464.  
  2465.  
  2466.          --------------------------------------------------------------
  2467.          Animate
  2468.  
  2469.          When you select the Animate option, the Debugger steps
  2470.          through the current application one line at a time, moving
  2471.          the Execution Bar to each line as it is executed.  This form
  2472.          of execution is called "Animate Mode."  If Options:Exchange
  2473.          Screens is ON, the output of each line is shown after the
  2474.          line has been executed.  Control then returns to the
  2475.          Debugger, the Execution Bar moves to the next line, that line
  2476.          is executed, and so on.  This continues until a Breakpoint or
  2477.          Tracepoint is reached.  For more information on modes of
  2478.          execution, see Chapter 4, Debugging a Program.
  2479.  
  2480.          See also: Options:Exchange Screens, Options:Swap on Input,
  2481.          Run:Speed, ANIMATE
  2482.  
  2483.  
  2484.          --------------------------------------------------------------
  2485.          Step
  2486.  
  2487.          The Step option executes your application in Single Step
  2488.          Mode.  This mode executes the line of program code
  2489.          highlighted by the Execution Bar, moves the Execution Bar to
  2490.          the next line of code to be executed, and stops.  As
  2491.          functions are called by the current program, their code is
  2492.          displayed in the Code Window.  F8 performs the same function
  2493.          as the Run:Step menu option.
  2494.  
  2495.          See also: F8, Options:Codeblock Trace, STEP
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.                                           The Debugger Display    3-18
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.          --------------------------------------------------------------
  2514.          Trace
  2515.  
  2516.          The Trace option is similar to Step in that it executes one
  2517.          line of program code at a time.  However, Trace does not
  2518.          display the code for functions called by the current
  2519.          program.  F10 performs the same function as the Run:Trace
  2520.          menu option.
  2521.  
  2522.          See also: F10
  2523.  
  2524.  
  2525.          --------------------------------------------------------------
  2526.          Go
  2527.  
  2528.          When you select the Go option, the Debugger displays your
  2529.          application screen and begins execution in Run Mode;
  2530.          execution continues until a Breakpoint or Tracepoint is
  2531.          encountered, or until the Debugger is invoked with ALTD() or
  2532.          Alt-D.  F5 performs the same function as the Run:Go menu
  2533.          option.
  2534.  
  2535.          See also: F5, GO
  2536.  
  2537.  
  2538.          --------------------------------------------------------------
  2539.          To Cursor
  2540.  
  2541.          The To Cursor option allows you to execute only those lines
  2542.          of code up to the line indicated by the current cursor
  2543.          position in the Code Window.  The application is executed in
  2544.          Run Mode until that line is reached.  If the line is never
  2545.          executed, the Debugger continues to the end of the
  2546.          application.  F7 performs the same function as the Run:To
  2547.          Cursor menu option.
  2548.  
  2549.          See also: F7
  2550.  
  2551.  
  2552.          --------------------------------------------------------------
  2553.          Speed...
  2554.  
  2555.          The Speed option allows you to set the step delay for Animate
  2556.          Mode in tenths of seconds (for an explanation of this mode,
  2557.          see Chapter 4, Debugging a Program).
  2558.  
  2559.          When you select this option, a dialog box is displayed and
  2560.          you are asked to enter a number representing the step speed. 
  2561.          The number that you enter is interpreted as tenths of
  2562.          seconds, so that entering a small number such as zero results
  2563.          in a faster display time than entering a larger number.  The
  2564.          current setting is displayed in the dialog box when you
  2565.          select Run:Speed.
  2566.  
  2567.          See also: Run:Animate, SPEED
  2568.  
  2569.  
  2570.  
  2571.  
  2572.                                           The Debugger Display    3-19
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.       The Point Menu
  2580.  
  2581.          The Point menu contains options to set and delete
  2582.          Breakpoints, Watchpoints, and Tracepoints, and is selected by
  2583.          pressing Alt-P.
  2584.  
  2585.          Breakpoints are lines of code at which the application pauses
  2586.          and returns control to the Debugger.  Watchpoints are
  2587.          variables and expressions whose values are displayed in the
  2588.          Watch Window and updated as each line of the application
  2589.          executes.  Tracepoints are very similar; however, whenever
  2590.          the value of a Tracepoint changes, execution pauses and
  2591.          control passes to the Debugger.  Tracepoints are also
  2592.          displayed in the Watch Window.  For more information on
  2593.          Watchpoints and Tracepoints, see Chapter 4, Debugging a
  2594.          Program.
  2595.  
  2596.  
  2597.          --------------------------------------------------------------
  2598.          Watchpoint...
  2599.  
  2600.          The Watchpoint option designates a field variable, memory
  2601.          variable or expression as a Watchpoint.  When you select this
  2602.          option, a dialog box is displayed and you are asked to enter
  2603.          a variable or expression.  Your entry is then displayed in
  2604.          the Watch Window at the top of the screen, together with its
  2605.          type and value and the word "wp."  As each line of the
  2606.          current program is executed, the value of the Watchpoint is
  2607.          updated.
  2608.  
  2609.          See also: Point:Delete, WP
  2610.  
  2611.  
  2612.          --------------------------------------------------------------
  2613.          Tracepoint...
  2614.  
  2615.          This option allows you to specify a field variable, memory
  2616.          variable or expression as a Tracepoint.  As is the case for
  2617.          Watchpoints, a dialog box is displayed and you are prompted
  2618.          for an expression or the name of a variable.  This is then
  2619.          displayed in the Watch Window along with its type and value,
  2620.          and noted as "tp."  Unlike Watchpoints, every time the value
  2621.          of the Tracepoint changes, program execution pauses and
  2622.          control passes to the Debugger.
  2623.  
  2624.          See also: Point:Delete, TP
  2625.  
  2626.  
  2627.          --------------------------------------------------------------
  2628.          Breakpoint
  2629.  
  2630.          The Breakpoint option designates the line of code indicated
  2631.          by the cursor in the Code Window as a Breakpoint.  When you
  2632.          select this option, the line of code is indicated in a new
  2633.          color to distinguish it is as a Breakpoint.  This menu option
  2634.  
  2635.  
  2636.  
  2637.  
  2638.                                           The Debugger Display    3-20
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.          acts as a toggle so that if the current line of code is
  2646.          already a Breakpoint, the Breakpoint is deleted and the color
  2647.          of the line returns to normal.
  2648.  
  2649.          Pressing F9 is equivalent to selecting the Point:Breakpoint
  2650.          menu option.
  2651.  
  2652.  
  2653.          --------------------------------------------------------------
  2654.          Delete...
  2655.  
  2656.          When you select the Delete option, a dialog box is displayed
  2657.          and you are asked to enter the number that appears to the
  2658.          left of the Watchpoint or Tracepoint you want to delete. 
  2659.          Your selection is then removed from the Watch Window.
  2660.  
  2661.          See also: Point:Watchpoint, Point:Tracepoint, DELETE
  2662.  
  2663.  
  2664.       The Monitor Menu
  2665.  
  2666.          The Monitor menu contains a set of options that control the
  2667.          display of PUBLIC, PRIVATE, STATIC and LOCAL variables in the
  2668.          Monitor Window.  This menu is activated by pressing Alt-M. 
  2669.          Variables displayed using the menu options described in this
  2670.          section are known as "monitored" variables.
  2671.  
  2672.          Monitored variables relate to the routine currently displayed
  2673.          in the Code Window.  When a pending activation is viewed, the
  2674.          values displayed for the monitored variables are the values
  2675.          that they held when the routine was active.  Inspecting the
  2676.          variables with the ?|?? command or specifying them as
  2677.          Watchpoints or Tracepoints yields the current value, which
  2678.          may be different from the value displayed in the Monitor
  2679.          Window.  Any existing variables which are not visible to the
  2680.          activation in the Code Window do not appear in the Monitor
  2681.          Window.
  2682.  
  2683.          Each of the options on the Monitor menu can either be ON
  2684.          (indicated by a check mark) or OFF.  When ON, variables of
  2685.          the appropriate storage class are displayed in the Monitor
  2686.          Window.  To toggle between the two states, highlight the
  2687.          appropriate option and press Return.
  2688.  
  2689.  
  2690.          --------------------------------------------------------------
  2691.          Public
  2692.  
  2693.          When ON, the Public option monitors PUBLIC variables in the
  2694.          Monitor Window.
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.                                           The Debugger Display    3-21
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.          --------------------------------------------------------------
  2712.          Private
  2713.  
  2714.          When ON, this option, specifies PRIVATE variables as
  2715.          monitored variables, and displays them in the Monitor Window.
  2716.  
  2717.  
  2718.          --------------------------------------------------------------
  2719.          Static
  2720.  
  2721.          When the Static option is ON, STATIC variables are monitored
  2722.          in the Monitor Window.
  2723.  
  2724.  
  2725.          --------------------------------------------------------------
  2726.          Local
  2727.  
  2728.          When this option is ON, LOCAL variables are displayed in the
  2729.          Monitor Window.
  2730.  
  2731.  
  2732.          --------------------------------------------------------------
  2733.          Sort
  2734.  
  2735.          The Sort option controls the order in which items are
  2736.          displayed in the Monitor Window.  When Sort is ON (indicated
  2737.          by a check mark), items in the Monitor Window are displayed
  2738.          in alphabetical order according to variable name.  When the
  2739.          option is OFF, the monitored variables are grouped by storage
  2740.          class.
  2741.  
  2742.  
  2743.       The Options Menu
  2744.  
  2745.          The Options menu allows you to control the Debugger display
  2746.          options and to create and run Debugger script files.  This
  2747.          menu is selected by pressing Alt-O.
  2748.  
  2749.  
  2750.          --------------------------------------------------------------
  2751.          Preprocessed Code
  2752.  
  2753.          The Preprocessed Code option is a toggle.  If it is ON
  2754.          (indicated by a check mark), the pre-processed code for the
  2755.          current program is displayed in the Code Window underneath
  2756.          each line of source code.  Since the pre-processed code is
  2757.          taken from the corresponding (.ppo) file, the program in the
  2758.          Code Window must have been compiled with the /P option. 
  2759.          Otherwise, no pre-processed code is displayed.
  2760.  
  2761.          If Preprocessed Code is OFF, the default, the source code is
  2762.          displayed in the Code Window without pre-processed output.
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.                                           The Debugger Display    3-22
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.          --------------------------------------------------------------
  2778.          Line Numbers
  2779.  
  2780.          The Line Numbers option is a toggle used to control the
  2781.          display of line numbers in the Code Window.  If the option is
  2782.          ON (indicated by a check mark), a line number is displayed to
  2783.          the left of each line of source code.  If not, no line
  2784.          numbers are visible.
  2785.  
  2786.          Having Line Numbers displayed in the Code Window is
  2787.          especially helpful when using the Locate:Goto Line menu
  2788.          option to move the cursor to a particular line of code.
  2789.  
  2790.          See also: NUM
  2791.  
  2792.  
  2793.          --------------------------------------------------------------
  2794.          Exchange Screens
  2795.  
  2796.          The Exchange Screens option is a toggle that controls the
  2797.          display of program output while in Animate Mode.  If this
  2798.          option is ON (indicated by a check mark), Animate Mode
  2799.          displays application output for each line of code executed.
  2800.  
  2801.          If Exchange Screens is OFF, the Debugger displays the
  2802.          application screen only when input is required.  For more
  2803.          information on modes of execution, see Chapter 4, Debugging a
  2804.          Program.
  2805.  
  2806.          See also: Run:Animate, Options:Swap on Input
  2807.  
  2808.  
  2809.          --------------------------------------------------------------
  2810.          Swap on Input
  2811.  
  2812.          If Options:Exchange Screens is ON, Swap on Input has no
  2813.          effect.  If, however, Options:Exchange Screens is OFF, Swap
  2814.          on Input acts as a toggle to control whether or not the
  2815.          application screen is displayed when input is required.
  2816.  
  2817.          By default, Swap on Input is ON (indicated by a check mark)
  2818.          which causes Run:Animate to swap to the application screen
  2819.          when input is required.  If Swap on Input is OFF, the
  2820.          application screen is not displayed during Animate Mode.
  2821.  
  2822.          See also: Options:Exchange Screens, Run:Animate
  2823.  
  2824.  
  2825.          --------------------------------------------------------------
  2826.          Codeblock Trace
  2827.  
  2828.          The Codeblock Trace option is a toggle that controls whether
  2829.          or not the Debugger traces code blocks in Step Mode.  If the
  2830.          option is ON (indicated by a check mark), Step Mode traces a
  2831.          code block back to its definition each time the code block is
  2832.  
  2833.  
  2834.  
  2835.  
  2836.                                           The Debugger Display    3-23
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.          evaluated.  It does this by moving the Execution Bar to the
  2844.          line where the code block was defined, allowing you to see
  2845.          the code block definition.
  2846.  
  2847.          Tracing code blocks involves an extra step each time a code
  2848.          block is evaluated because you also have to step over the
  2849.          definition line.  If you do not want to trace code block
  2850.          definitions, deselect Codeblock Trace.
  2851.  
  2852.          See also: Run:Step
  2853.  
  2854.  
  2855.          --------------------------------------------------------------
  2856.          Menu Bar
  2857.  
  2858.          The Menu Bar option is a toggle that controls the display of
  2859.          the menu bar.  If the option is ON (indicated by a check
  2860.          mark), the menu bar is displayed at the top of the main
  2861.          Debugger screen at all times.  If the option is OFF, the menu
  2862.          bar is not displayed unless you activate a menu.
  2863.  
  2864.  
  2865.          --------------------------------------------------------------
  2866.          Mono Display
  2867.  
  2868.          The Mono Display option is a toggle that controls whether the
  2869.          screen display is color or monochrome.  Note that the default
  2870.          status of this option depends on the kind of monitor you are
  2871.          using, and that the option is effective only for color
  2872.          monitors.  If you have a color monitor and Mono Display is ON
  2873.          (indicated by a check mark), a full range of color settings
  2874.          are available for the Debugger display.  If the option is
  2875.          OFF, the display is monochrome.
  2876.  
  2877.          See also: Options:Colors
  2878.  
  2879.  
  2880.          --------------------------------------------------------------
  2881.          Colors...
  2882.  
  2883.          The Colors options activates the Set Colors Window where you
  2884.          can inspect the Debugger display colors.  Press Esc to close
  2885.          the window and continue debugging.  See The Set Colors Window
  2886.          section earlier in this chapter for more information on this
  2887.          window.
  2888.  
  2889.  
  2890.          --------------------------------------------------------------
  2891.          Tab Width...
  2892.  
  2893.          The Tab Width option allows you to set the tab width for the
  2894.          Code Window.  Selecting this option opens a dialog box where
  2895.          the new value is entered.
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.                                           The Debugger Display    3-24
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.          Options:Tab Width is effective only if the file you are
  2910.          viewing contains tabs.  Lines that are indented with spaces
  2911.          are not affected.  The default Tab Width setting is 4.
  2912.  
  2913.  
  2914.          --------------------------------------------------------------
  2915.          Save Settings...
  2916.  
  2917.          The Save Settings option saves the current Debugger settings
  2918.          in a script file using menu commands.  Selecting this option
  2919.          opens a dialog box where you enter a filename (default
  2920.          extension is .CLD).
  2921.  
  2922.          The script file can be executed by selecting Options:Restore
  2923.          Settings or using the INPUT command.  It can also be executed
  2924.          from the CLD command-line the next time you execute the
  2925.          Debugger.
  2926.  
  2927.          See also: Options:Restore Settings, INPUT
  2928.  
  2929.  
  2930.          --------------------------------------------------------------
  2931.          Restore Settings...
  2932.  
  2933.          The Restore Settings option executes a Debugger script file. 
  2934.          Selecting this option opens a dialog box where you enter a
  2935.          filename (default extension is .CLD).
  2936.  
  2937.          See also: Options:Save Settings, INPUT
  2938.  
  2939.  
  2940.       The Window Menu
  2941.  
  2942.          The Window menu, selected by pressing Alt-W, allows you to
  2943.          perform certain Window operations including sizing and moving
  2944.          the active window.  See the Window Operations section earlier
  2945.          in this chapter for information on how to navigate within the
  2946.          Help Window.
  2947.  
  2948.  
  2949.          --------------------------------------------------------------
  2950.          Next
  2951.  
  2952.          The Next option selects the next window on the main Debugger
  2953.          screen.  The order of the windows is as follows: Code,
  2954.          Monitor, Watch, Callstack, Command.  Thus, if the Callstack
  2955.          Window is active, Window:Next selects the Command Window. 
  2956.          Pressing Tab is equivalent to selecting this menu option.
  2957.  
  2958.  
  2959.          --------------------------------------------------------------
  2960.          Prev
  2961.  
  2962.          The Prev option selects the previous window on the main
  2963.          Debugger screen.  The order of the windows is as follows:
  2964.          Code, Monitor, Watch, Callstack, Command.  Thus, if the
  2965.  
  2966.  
  2967.  
  2968.                                           The Debugger Display    3-25
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.          Callstack Window is active, Window:Prev selects the Watch
  2976.          Window.  Pressing Shift-Tab is equivalent to selecting this
  2977.          menu option.
  2978.  
  2979.  
  2980.          --------------------------------------------------------------
  2981.          Move
  2982.  
  2983.          Move allows you to move the active window around on the
  2984.          screen.  When you select this option, the border of the
  2985.          active window changes to a different pattern and the cursor
  2986.          keys are used to move the window.  Return completes the
  2987.          moving process.
  2988.  
  2989.          --------------------------------------------------------------
  2990.          Note
  2991.  
  2992.          Windows cannot be moved if you are running the Debugger in
  2993.          split screen mode.
  2994.          --------------------------------------------------------------
  2995.  
  2996.  
  2997.          --------------------------------------------------------------
  2998.          Size
  2999.  
  3000.          The Size option allows you to change both the height and the
  3001.          width of the active window.  When you select this option, the
  3002.          border of the active window changes to a different pattern
  3003.          and the cursor keys are used to change the size of the
  3004.          window.  Return completes the sizing process.
  3005.  
  3006.          --------------------------------------------------------------
  3007.          Note
  3008.  
  3009.          Windows cannot be sized if you are running the Debugger in
  3010.          split screen mode.
  3011.          --------------------------------------------------------------
  3012.  
  3013.  
  3014.          --------------------------------------------------------------
  3015.          Zoom
  3016.  
  3017.          The Zoom option allows you to zoom the active window to full
  3018.          screen.  This menu option acts as a toggle between the full
  3019.          screen and window display modes so that when the active
  3020.          window is zoomed to full screen, selecting Window:Zoom
  3021.          resumes the original window display.  When a window is
  3022.          zoomed, some window operations such as moving and sizing are
  3023.          not allowed.  Pressing F2 is equivalent to selecting this
  3024.          menu option.
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.                                           The Debugger Display    3-26
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.          --------------------------------------------------------------
  3042.          Iconize
  3043.  
  3044.          The Iconize option reduces the active window to an icon (its
  3045.          name).  A window that is iconized remains open, but you
  3046.          cannot see the window contents.  Certain window operations
  3047.          such as moving, however, are possible.
  3048.  
  3049.  
  3050.          --------------------------------------------------------------
  3051.          Tile
  3052.  
  3053.          The Tile option provides a quick way to clean up the screen
  3054.          by restoring each window on the screen to its default
  3055.          location and size.  Any windows that have been zoomed or
  3056.          iconized are also restored to the original window display
  3057.          mode.
  3058.  
  3059.  
  3060.       The Help Menu
  3061.  
  3062.          The Help menu, selected by pressing Alt-H, allows you to
  3063.          activate the Help Window.  The menu options select the help
  3064.          topic that is initially highlighted when the window is
  3065.          opened.  Pressing F1 opens the same Help Window, but with the
  3066.          About Help topic highlighted.
  3067.  
  3068.          After making a selection and getting the help you want, press
  3069.          Esc to return to the Debugger.  See the The Help Window
  3070.          section earlier in this chapter for information on how to
  3071.          navigate within the Help Window.
  3072.  
  3073.          See also: F1, HELP
  3074.  
  3075.  
  3076.          --------------------------------------------------------------
  3077.          Keys
  3078.  
  3079.          The Keys option causes the Keys topic to be highlighted when
  3080.          the Help Window is opened, and a general discussion of
  3081.          Debugger keys is displayed.  Keys subtopics include Function,
  3082.          Menu, Window, and Other which can be selected using Dnarrow.
  3083.  
  3084.  
  3085.          --------------------------------------------------------------
  3086.          Windows
  3087.  
  3088.          The Windows option highlights the Windows topic when the Help
  3089.          Window is opened, and a general discussion of Debugger
  3090.          windows is displayed.  The Windows topic is further
  3091.          subdivided into discussions on the Command, Code, Watch,
  3092.          Monitor, and Callstack which can be selected using Dnarrow.
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.                                           The Debugger Display    3-27
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.          --------------------------------------------------------------
  3108.          Menus
  3109.  
  3110.          The Menus option causes the Menus topic to be highlighted
  3111.          when the Help Window is opened, and a general discussion of
  3112.          the Debugger menus is displayed.  Each Menu (except Help) is
  3113.          discussed further as a subtopic.  To get help on a particular
  3114.          menu, highlight the menu name using Dnarrow.
  3115.  
  3116.  
  3117.          --------------------------------------------------------------
  3118.          Commands
  3119.  
  3120.          The Commands option causes the Commands topic to be
  3121.          highlighted when the Help Window is opened.  Commands is not
  3122.          subdivided into topics, but the discussion includes a list of
  3123.          commands in alphabetical order.  Use PgUp and PgDn to page
  3124.          through the help text until the command you are seeking is
  3125.          displayed.
  3126.  
  3127.  
  3128.       -----------------------------------------------------------------
  3129.       The Function Keys
  3130.  
  3131.          All of the function keys used in the Debugger are shortcuts
  3132.          to using a menu selection or command.  For example, using F9
  3133.          to set a Breakpoint is slightly easier than selecting the
  3134.          Breakpoint option from the Point menu and much easier than
  3135.          entering the appropriate BP or DELETE command.  The following
  3136.          table shows a list of all the available functions keys and
  3137.          their actions:
  3138.  
  3139.          Table 3-11:  Function Keys
  3140.          --------------------------------------------------------------
  3141.          Key   Action                     Alternative
  3142.          --------------------------------------------------------------
  3143.          F1    Help                       Help Menu, HELP
  3144.          F2    Full screen/window toggle  Window:Zoom
  3145.          F4    Application Screen         View:App Screen, OUTPUT
  3146.          F5    Execute Application        Run:Go, GO
  3147.          F6    View Workareas Window      View:Workareas
  3148.          F7    Run to Cursor              Run:To Cursor
  3149.          F8    Step                       Run:Step, STEP
  3150.          F9    Set/Delete Breakpoint      Point:Breakpoint, BP and 
  3151.                                           DELETE BP
  3152.          F10   Trace                      Run:Trace
  3153.          --------------------------------------------------------------
  3154.  
  3155.  
  3156.          F1 Help
  3157.  
  3158.          Pressing F1 displays the Help Window.  Use Uparrow and
  3159.          Dnarrow to select a topic in the left pane of the window; the
  3160.          help text for the currently highlighted topic appears in the
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.                                           The Debugger Display    3-28
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.          right window pane.  Press Esc to return to the Debugger.  You
  3174.          can display the Help Window using the Help menu or entering
  3175.          the HELP command.
  3176.  
  3177.  
  3178.          F2 Zoom Full Screen/Window Display
  3179.  
  3180.          F2 acts as a toggle between the full-screen and window
  3181.          displays.  To zoom the active window to full-screen press F2,
  3182.          and to restore the window display press F2 again.  F2
  3183.          performs the same function as the Window:Zoom menu option.
  3184.  
  3185.  
  3186.          F4 Application Screen
  3187.  
  3188.          Pressing F4 erases the Debugger screen and displays your
  3189.          application screen in its place.  This allows you to see the
  3190.          output of the program being debugged exactly as the person
  3191.          using your application will see it.  F4 performs the same
  3192.          function as the OUTPUT command and the View:App Screen menu
  3193.          option.
  3194.  
  3195.  
  3196.          F5 Execute Application
  3197.  
  3198.          This key displays your application screen and begins
  3199.          execution in Run Mode; that is, until a Breakpoint or
  3200.          Tracepoint is encountered, or until the Debugger is
  3201.          deliberately invoked (i.e., by pressing Alt-D or using
  3202.          ALTD()).  F5 performs the same function as the GO command and
  3203.          the Run:Go menu option.  For more information on modes of
  3204.          execution, see Chapter 4, Debugging a Program.
  3205.  
  3206.  
  3207.          F6 View Workareas
  3208.  
  3209.          The F6 key displays the View Workareas Window.  This window
  3210.          contains information on the currently open database (.dbf)
  3211.          files.  F6 performs the same function as the View:Workareas
  3212.          menu option.  
  3213.  
  3214.  
  3215.          F7 Run to Cursor
  3216.  
  3217.          This key sets a temporary Breakpoint on the line indicated by
  3218.          the cursor in the Code Window.  The application is executed
  3219.          in Run Mode until that line is reached, or until the value of
  3220.          a Tracepoint changes.  If the line is never executed, the
  3221.          Debugger continues to the end of the application.  F7
  3222.          performs the same function as the Run:To Cursor menu option. 
  3223.          For an explanation of execution modes, see Chapter 4,
  3224.          Debugging a Program.
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.                                           The Debugger Display    3-29
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.          F8 Step
  3240.  
  3241.          F8 executes the program in Single Step Mode.  This mode
  3242.          executes the line of program code highlighted by the
  3243.          Execution Bar, moves the Execution Bar to the next line of
  3244.          code to be executed, and stops.  As functions are called by
  3245.          the current program, their code is displayed in the Code
  3246.          Window.  F8 performs the same function as the STEP command
  3247.          and the Run:Step menu option.
  3248.  
  3249.          When single stepping through a piece of code containing a
  3250.          code block, the Execution Bar moves to the line of code where
  3251.          the block was created when the code block is evaluated.  This
  3252.          allows you to see the contents of the block (which are
  3253.          unavailable during normal inspection), and occurs regardless
  3254.          of whether the block was declared in the current routine. 
  3255.          Press F8 again to move past this line to the next executable
  3256.          line.  For more information on execution modes, see Chapter
  3257.          4, Debugging a Program.
  3258.  
  3259.  
  3260.          F9 Set/Delete Breakpoint
  3261.  
  3262.          F9 acts as a toggle between setting and deleting a Breakpoint
  3263.          at the current line (indicated by the cursor in the Code
  3264.          Window).  To set the Breakpoint press F9, and to delete the
  3265.          Breakpoint press F9 again.  Breakpoints are indicated in the
  3266.          Code Window using a display attribute that is different from
  3267.          other lines.  F9 performs the same function as the BP/DELETE
  3268.          BP commands and the Point:Breakpoint menu option.  For more
  3269.          information on Breakpoints, see Chapter 4, Debugging a
  3270.          Program.
  3271.  
  3272.  
  3273.          F10 Trace
  3274.  
  3275.          F10 performs a similar function to F8, namely, executing one
  3276.          line of program code.  However, F10 does not display the code
  3277.          for functions called by the current program.  F10 performs
  3278.          the same function as the Run:Trace menu option.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.                                           The Debugger Display    3-30
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.      ==================================================================
  3306.      Chapter 4:  Debugging a Program
  3307.  
  3308.      ------------------------------------------------------------------
  3309.  
  3310.           In This Chapter                   4-1
  3311.           
  3312.           Executing Program Code            4-1
  3313.           
  3314.           Inspecting Data and Expressions   4-5
  3315.           
  3316.           Inspecting Program Code           4-7
  3317.           
  3318.           Accessing DOS                     4-10
  3319.  
  3320.  
  3321.  
  3322.  
  3323.  
  3324.  
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330.  
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.          Chapter 4 -- Debugging a Program
  3372.  
  3373.          So far, we have described some of the most commonly used
  3374.          features of The Clipper Debugger.  We have explained how to
  3375.          start the debugging process and given a description of all
  3376.          the elements of the screen display.  In order to make full
  3377.          use of this knowledge, this chapter provides a more detailed
  3378.          study of the most powerful features, together with
  3379.          suggestions on the most appropriate places to use them.
  3380.  
  3381.  
  3382.       -----------------------------------------------------------------
  3383.       In This Chapter
  3384.  
  3385.          This chapter takes an in-depth look at the features you will
  3386.          use most when debugging a program.  The following topics are
  3387.          covered:
  3388.  
  3389.          *  Executing program code
  3390.  
  3391.          *  Inspecting data and expressions
  3392.  
  3393.          *  Inspecting program code
  3394.  
  3395.          *  Accessing DOS
  3396.  
  3397.  
  3398.       -----------------------------------------------------------------
  3399.       Executing Program Code
  3400.  
  3401.          The most basic function of a debugger is to execute an
  3402.          application and display the results.  This section describes
  3403.          the various ways to run a program and explains how to control
  3404.          the speed and view the output.
  3405.  
  3406.  
  3407.       Modes of Execution
  3408.  
  3409.          The Clipper Debugger provides several different ways to
  3410.          execute a program.  The following table lists each of these
  3411.          methods, together with the mode of execution:
  3412.  
  3413.          Table 4-1: Program Execution Methods
  3414.          --------------------------------------------------------------
  3415.          Method         Execution Mode
  3416.          --------------------------------------------------------------
  3417.          Run:Animate    Animate
  3418.          F5             Run
  3419.          F7             Run to Cursor
  3420.          F8             Single Step
  3421.          F10            Trace
  3422.          ANIMATE        Animate
  3423.          GO             Run
  3424.          STEP           Single Step
  3425.          --------------------------------------------------------------
  3426.  
  3427.  
  3428.  
  3429.  
  3430.                                             Debugging a Program    4-1
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.          *  Single Step Mode
  3438.  
  3439.             F8 executes the program in Single Step Mode.  This mode
  3440.             executes the line of program code highlighted by the
  3441.             Execution Bar, moves the Execution Bar to the next line of
  3442.             code to be executed, and stops.  As functions are called
  3443.             by the current program, their code is displayed in the
  3444.             Code Window.  F8 performs the same function as the STEP
  3445.             command and the Run:Step menu option.
  3446.  
  3447.             When single stepping through a piece of code containing a
  3448.             code block, the Execution Bar moves to the line of code
  3449.             where the block was created when the code block is
  3450.             evaluated.  This allows you to see the contents of the
  3451.             block (which are unavailable during normal inspection),
  3452.             and occurs regardless of whether the block was declared in
  3453.             the current routine.  Press F8 again to move past this
  3454.             line to the next executable line.  This behavior can be
  3455.             controlled using the Options:Codeblock Trace menu option.
  3456.  
  3457.             This execution mode is best used in situations where the
  3458.             error you are looking for has been narrowed down to a few
  3459.             lines of code.  It allows you to step slowly through each
  3460.             line, viewing the output and examining variables as you
  3461.             go.
  3462.  
  3463.  
  3464.          *  Trace Mode
  3465.  
  3466.             Trace Mode is similar to Single Step Mode in that it
  3467.             executes one line of program code at a time.  However,
  3468.             Trace Mode does not display the code for functions and
  3469.             procedures called by the current program nor does it trace
  3470.             code blocks back to their definition.  F10 executes the
  3471.             line of code currently at the Execution Bar in Trace
  3472.             Mode.  Alternatively, the Run:Trace menu option can be
  3473.             used.
  3474.  
  3475.  
  3476.          *  Animate Mode
  3477.  
  3478.             In Animate Mode, the application runs one line at a time,
  3479.             with the Execution Bar moving to each line as it is
  3480.             executed.  If the Options:Exchange Screens menu option is
  3481.             ON, the output of each line is shown after the line has
  3482.             been run.  The next line is then executed, and so on. 
  3483.             This continues until you press a key, or until a
  3484.             Breakpoint or Tracepoint is reached.  Animate Mode allows
  3485.             you to execute large portions of an application, stopping
  3486.             when the value of a "suspect" variable or expression
  3487.             changes.  It is used by the ANIMATE command and the
  3488.             Run:Animate menu option.
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.  
  3495.  
  3496.                                             Debugging a Program    4-2
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.          *  Run Mode
  3504.  
  3505.             The Run Mode is the fastest way to execute a program. 
  3506.             Your application runs until a Breakpoint or Tracepoint is
  3507.             reached, without returning to the Debugger display for
  3508.             each line of code executed.  This mode is used by the GO
  3509.             command, the Run:Go and Run:To Cursor menu options, and
  3510.             the F5 and F7 keys.
  3511.  
  3512.  
  3513.       Finding Program Errors
  3514.  
  3515.          As we have already mentioned, the Debugger provides several
  3516.          ways to execute a program.  The method you use depends on how
  3517.          far you have progressed in your debugging effort.  The
  3518.          following sections explain three common debugging stages and
  3519.          suggest an appropriate method for each stage.
  3520.  
  3521.  
  3522.          --------------------------------------------------------------
  3523.          Starting Out
  3524.  
  3525.          The easiest way to debug a program for the first time is to
  3526.          use the F5 key or the GO command to run the application
  3527.          without pausing, showing the program output in the context of
  3528.          the application (Run Mode).  As soon as you notice a possible
  3529.          error, press Alt-D to invoke the Debugger.
  3530.  
  3531.          Simple errors, such as mistakes in screen design, can be
  3532.          amended immediately.  In these cases, it usually is not
  3533.          necessary to re-compile and re-link before continuing; the
  3534.          errors do not affect the actual execution of a program, only
  3535.          the display.  For more complex problems, you must continue to
  3536.          the next stage of debugging: taking a closer look.
  3537.  
  3538.  
  3539.          --------------------------------------------------------------
  3540.          Taking a Closer Look
  3541.  
  3542.          When the cause of a problem is not immediately obvious, the
  3543.          next step is to closely examine the contents of suspected
  3544.          fields, memory variables and expressions.  Often, the ?|??
  3545.          command reveals an unexpected value for one of these items. 
  3546.          If this is the case, specify the item as a Watchpoint or
  3547.          Tracepoint.  This allows you to pinpoint exactly where in the
  3548.          application the erroneous value was stored.
  3549.  
  3550.          If you suspect that several variables in a particular storage
  3551.          class may be at fault, use the options on the Monitor menu to
  3552.          display these variables in the Monitor Window.  For example,
  3553.          to display PRIVATE variables, select the Monitor:Private
  3554.          option.  As you continue your debugging session, the PRIVATE
  3555.          variables visible to the routine displayed in the Code Window
  3556.          are updated in the Monitor Window.
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.                                             Debugging a Program    4-3
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.          After setting up the necessary Watchpoints and Tracepoints,
  3570.          use the ANIMATE command or the Run:Animate menu option to run
  3571.          the program slowly, displaying the code for each line
  3572.          executed (Animate Mode).  The SPEED command and the Run:Speed
  3573.          menu option can be used to control the speed of the display.
  3574.  
  3575.          Continue this process until the problem has been confined to
  3576.          a few lines of code.  Now it is time to move on to the final
  3577.          stage.
  3578.  
  3579.  
  3580.          --------------------------------------------------------------
  3581.          Final Stage
  3582.  
  3583.          When the cause of an error has been narrowed down to a few
  3584.          lines of code, use the F9 key or the BP command to set a
  3585.          Breakpoint at the first of these lines.  Then use the F5 key
  3586.          or the GO command to execute the application up to that
  3587.          point.
  3588.  
  3589.          When you have reached the suspect area of code, use the F8
  3590.          key to step through the code one line at a time.  If you are
  3591.          certain that the error is in the current program and not in
  3592.          any subsidiary procedures or functions, use the F10 key
  3593.          instead; this does not display the code for called
  3594.          procedures.
  3595.  
  3596.          Executing your application in Single Step Mode while watching
  3597.          the values of the items in the Watch Window is usually
  3598.          sufficient to uncover the cause of a problem.  Having done
  3599.          that, simply alter your code, re-compile, re-link, and begin
  3600.          searching for the next error.
  3601.  
  3602.  
  3603.       Viewing Program Output
  3604.  
  3605.          There may be times when you want to look at the output of a
  3606.          program rather than the code.  The first three ways to
  3607.          achieve this are the F4 key, the OUTPUT command, and the
  3608.          View:App Screen menu option.  Each of these methods erases
  3609.          the Debugger screen and displays the current output exactly
  3610.          as the person running the application will see it.  Press any
  3611.          key to return to the original display.
  3612.  
  3613.          Alternatively, program output can be viewed following
  3614.          execution of each individual line of code.  This is achieved
  3615.          by setting the Options:Exchange Screens menu option, then
  3616.          using the ANIMATE command or the Run:Animate menu option.
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.                                             Debugging a Program    4-4
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.       -----------------------------------------------------------------
  3636.       Inspecting Data and Expressions
  3637.  
  3638.          One of the most common uses for a debugger is examining
  3639.          (inspecting) and altering the values of variables and
  3640.          expressions.  The Clipper Debugger provides several ways to
  3641.          do this: the first of these is the ?|?? command.
  3642.  
  3643.          When you enter "?" followed by an expression, the expression
  3644.          is evaluated and the return value displayed in the Command
  3645.          Window.  This is a useful feature that allows you to execute
  3646.          procedures and functions linked into your application.
  3647.  
  3648.          An alternative way to inspect data and expressions is to set
  3649.          up Watchpoints and Tracepoints.  These are explained in the
  3650.          following sections.
  3651.  
  3652.  
  3653.       Using Watchpoints and Tracepoints
  3654.  
  3655.          Watchpoints and Tracepoints are two of the most valuable
  3656.          features of The Clipper Debugger.  They allow you to examine
  3657.          field variables, memory variables and expressions, and to
  3658.          pinpoint exactly where in your application their values
  3659.          change.  This section gives a definition of Watchpoints and
  3660.          Tracepoints and explains how they are set, deleted and
  3661.          inspected.
  3662.  
  3663.  
  3664.          --------------------------------------------------------------
  3665.          Definition of Watchpoints and Tracepoints
  3666.  
  3667.          A Watchpoint is a field, memory variable or expression whose
  3668.          current value is displayed in the Watch Window.  This value
  3669.          is updated as your application executes.
  3670.  
  3671.          A Tracepoint is similar to a Watchpoint; however, whenever
  3672.          its value changes, program execution pauses and control
  3673.          passes to the Debugger.  In this respect, a Tracepoint is
  3674.          similar to a Breakpoint.
  3675.  
  3676.  
  3677.          --------------------------------------------------------------
  3678.          Setting Watchpoints and Tracepoints
  3679.  
  3680.          There are several ways to set Watchpoints and Tracepoints. 
  3681.          If you use the Watchpoint and Tracepoint options on the Point
  3682.          menu, a dialog box is displayed and you are prompted to enter
  3683.          an expression or the name of a variable.  Your entry then
  3684.          appears in the Watch Window, together with the type and value
  3685.          and the word "wp" or "tp."  Alternatively, you can use the WP
  3686.          or TP commands and specify the name of the variable on the
  3687.          command-line.
  3688.  
  3689.          > WP nPageNum <Return>
  3690.          
  3691.  
  3692.  
  3693.  
  3694.                                             Debugging a Program    4-5
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.          > TP nInvNum = 1000 <Return>
  3702.  
  3703.  
  3704.          --------------------------------------------------------------
  3705.          Deleting Watchpoints and Tracepoints
  3706.  
  3707.          To delete an individual Watchpoint or Tracepoint, use the
  3708.          Point:Delete menu option.  When the dialog box appears, enter
  3709.          the number that appears on the far left-hand side of the
  3710.          Watch Window.  Alternatively, you can use the DELETE command
  3711.          and specify the Watchpoint or Tracepoint number on the
  3712.          command-line.  Using either method, the specified entry is
  3713.          removed from the Watch Window and the numbers of all the
  3714.          remaining entries are updated.
  3715.  
  3716.          To delete all Watchpoints and Tracepoints, use the DELETE
  3717.          command as follows:
  3718.  
  3719.          > DELETE ALL WP <Return>
  3720.          
  3721.          > DELETE ALL TP <Return>
  3722.          
  3723.          --------------------------------------------------------------
  3724.          Warning
  3725.  
  3726.          Be careful not to use DELETE ALL on its own: this deletes all
  3727.          Watchpoints, Tracepoints, and Breakpoints.
  3728.          --------------------------------------------------------------
  3729.  
  3730.  
  3731.          --------------------------------------------------------------
  3732.          Listing Watchpoints and Tracepoints
  3733.  
  3734.          To display all Watchpoints and Tracepoints, use the LIST
  3735.          command as follows:
  3736.  
  3737.          > LIST WP <Return>
  3738.          
  3739.          > LIST TP <Return>
  3740.  
  3741.  
  3742.          --------------------------------------------------------------
  3743.          Inspecting Watchpoints and Tracepoints
  3744.  
  3745.          To inspect a Watchpoint or Tracepoint and change its value,
  3746.          select the Watch Window, move the highlight bar to the item
  3747.          you wish to inspect, and press Return.  The current value of
  3748.          the field, memory variable or expression is displayed in a
  3749.          dialog box.  Within the dialog box, you can either enter a
  3750.          new value and press Return, or press Esc to leave the
  3751.          variable as it is.
  3752.  
  3753.          When you are finished inspecting items in the Watch Window,
  3754.          you can select another window with Tab or Shift-Tab.  For
  3755.          more information on the keys used to navigate the Watch
  3756.          Window, see Chapter 3, The Debugger Display.
  3757.  
  3758.  
  3759.  
  3760.                                             Debugging a Program    4-6
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.          --------------------------------------------------------------
  3768.          Creating New Variables
  3769.  
  3770.          Sometimes, an error may be caused by something as simple as a
  3771.          misspelled variable name.  In this case, you may want to
  3772.          create the variable from within the Debugger in order to
  3773.          continue debugging.
  3774.  
  3775.          Using the ?|?? command, a PRIVATE variable can be created and
  3776.          assigned a value.  For example:
  3777.  
  3778.          > ? myVar := 100 <Return>
  3779.          
  3780.          This creates a variable called myVar and assigns it a value
  3781.          of 100.  Remember that this variable is PRIVATE to the
  3782.          routine being executed when it was created.
  3783.  
  3784.          Only the in-line assignment (:=) operator can be used in this
  3785.          way: if the = operator had been used in the above example,
  3786.          the Debugger would have performed a comparison.
  3787.  
  3788.  
  3789.       -----------------------------------------------------------------
  3790.       Inspecting Program Code
  3791.  
  3792.          As you debug an application, you may need to examine the code
  3793.          of programs other than the one currently being executed. 
  3794.          This section describes how to view other programs and header
  3795.          files, and how to use the Callstack to access programs which
  3796.          have already been executed.  Breakpoints are also discussed.
  3797.  
  3798.  
  3799.       Using Breakpoints
  3800.  
  3801.          Breakpoints are similar to, and just as powerful as,
  3802.          Watchpoints and Tracepoints.  However, Breakpoints refer to
  3803.          actual lines of code rather than variables and expressions.  
  3804.  
  3805.          Breakpoints allow you to return control to the Debugger and
  3806.          execute problem areas of code in Single Step Mode (for an
  3807.          explanation of the modes of execution, see Executing Code in
  3808.          this chapter).  This section explains what Breakpoints are
  3809.          and how to set, delete and list them.
  3810.  
  3811.  
  3812.          --------------------------------------------------------------
  3813.          Definition of a Breakpoint
  3814.  
  3815.          A Breakpoint is a line of program code that causes execution
  3816.          to halt as soon as it is reached.
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.                                             Debugging a Program    4-7
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.          --------------------------------------------------------------
  3834.          Setting Breakpoints
  3835.  
  3836.          To set a Breakpoint, use the BP command or move the cursor to
  3837.          the appropriate line in the Code Window and select the
  3838.          Point:Breakpoint menu option.  Selecting this menu option is
  3839.          equivalent to pressing F9.  The selected line is highlighted.
  3840.  
  3841.          To pause execution whenever a particular routine is called,
  3842.          use the following syntax:
  3843.  
  3844.          > BP SayData <Return>
  3845.          
  3846.          Breakpoints can also be set in programs other than the one
  3847.          currently displayed in the Code Window.  This example sets a
  3848.          Breakpoint at line 15 in the program OpenDbfs.prg:
  3849.  
  3850.          > BP 15 IN OpenDbfs.prg <Return>
  3851.  
  3852.  
  3853.          --------------------------------------------------------------
  3854.          Deleting Breakpoints
  3855.  
  3856.          There are several ways to delete an individual Breakpoint. 
  3857.          The first is to move the cursor to the appropriate line in
  3858.          the Code Window and select Point:Breakpoint or press F9. 
  3859.          When the Breakpoint is deleted, the line returns to its
  3860.          normal color.
  3861.  
  3862.          Another way to delete a Breakpoint is to use the DELETE BP
  3863.          command followed by the Breakpoint number on the
  3864.          command-line.  Note that Breakpoint numbering begins with
  3865.          zero.  If you do not know the number, use the LIST command
  3866.          (see Listing Breakpoints in this chapter).
  3867.  
  3868.          To delete all Breakpoints, use the DELETE command as follows:
  3869.  
  3870.          > DELETE ALL BP <Return>
  3871.          
  3872.          --------------------------------------------------------------
  3873.          Warning
  3874.  
  3875.          Note that DELETE ALL without any other arguments also deletes
  3876.          all Watchpoints and Tracepoints.
  3877.          --------------------------------------------------------------
  3878.  
  3879.  
  3880.          --------------------------------------------------------------
  3881.          Listing Breakpoints
  3882.  
  3883.          To display all Breakpoints, use the LIST BP command.  This
  3884.          lists and numbers Breakpoints in the order they were
  3885.          entered.  Note that numbering begins with zero.
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.                                             Debugging a Program    4-8
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.       Navigating the Callstack
  3900.  
  3901.          The Callstack is a list of pending activations, including
  3902.          procedures, functions, code blocks and message sends.  It is
  3903.          displayed in the Callstack Window on the right-hand side of
  3904.          the screen, which is controlled using the CALLSTACK command
  3905.          or the View:Callstack menu option.
  3906.  
  3907.          When it is active, the Callstack Window allows you to
  3908.          highlight a program and view it in the Code Window.  To
  3909.          select the window, press Tab until its border is highlighted.
  3910.  
  3911.          When the Callstack Window is active, the highlight bar
  3912.          appears on the first item in the window.  You can use Uparrow
  3913.          and Dnarrow to move to the activation whose code you wish to
  3914.          view.  As the highlight is moved within the window, the Code
  3915.          Window is immediately updated to display the selected code. 
  3916.          To return to the program originally being debugged, use the
  3917.          RESUME command or the File:Resume menu option.  For a list of
  3918.          the Callstack navigation keys, see Chapter 3, The Debugger
  3919.          Display.
  3920.  
  3921.          If the activation you have chosen is a code block (denoted by
  3922.          a lower case "b"), the name in the Callstack is the name of
  3923.          the routine in which the block was created.  It is this code
  3924.          that appears in the Code Window.
  3925.  
  3926.          The Callstack is only concerned with executable code.  If you
  3927.          want to view the contents of a header file you must use the
  3928.          procedure outlined in the following section.
  3929.  
  3930.  
  3931.       Viewing Files
  3932.  
  3933.          Although inspecting the Callstack provides an easy way to
  3934.          select and view program code, it does not display header
  3935.          files.  If you already know the name of the program you want
  3936.          to look at, or you want to examine a header file, use the
  3937.          VIEW command or the File:Open menu option.
  3938.  
  3939.          The following example displays the code for the header file
  3940.          Inkey.ch in the Code Window:
  3941.  
  3942.          > VIEW C:\CLIPPER5\INCLUDE\Inkey.ch <Return>
  3943.          
  3944.          Notice that this example gives a file extension; if none is
  3945.          supplied, a (.prg) extension is assumed.
  3946.  
  3947.          When viewing a program file, Breakpoints can be set.  When
  3948.          you return to the original program by using the RESUME
  3949.          command or the File:Resume menu option, these settings are
  3950.          saved.
  3951.  
  3952.          For a list of navigation keys used within the Code Window,
  3953.          see Chapter 3, The Debugger Display.
  3954.  
  3955.  
  3956.  
  3957.  
  3958.                                             Debugging a Program    4-9
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.       -----------------------------------------------------------------
  3966.       Accessing DOS
  3967.  
  3968.          There may be times when you wish to execute a DOS command
  3969.          without leaving the Debugger.  For example, you may want to
  3970.          see a directory listing of all program (.prg) files.  To do
  3971.          this, use the DOS command or select the File:DOS Access menu
  3972.          option.
  3973.  
  3974.          Both DOS access methods mentioned above invoke a temporary
  3975.          copy of COMMAND.COM.  Make sure that you have sufficient
  3976.          memory available to load this file and any others you may
  3977.          wish to execute.  Remember that you are using a temporary
  3978.          copy of DOS, so any environment variables you set will be
  3979.          lost upon returning to the Debugger.
  3980.  
  3981.          When you have finished and wish to continue executing your
  3982.          application, type "Exit" at the DOS prompt.
  3983.  
  3984.  
  3985.  
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000.  
  4001.  
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.                                            Debugging a Program    4-10
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.      ==================================================================
  4032.      Chapter 5:  Command Reference
  4033.  
  4034.      ------------------------------------------------------------------
  4035.           ?|??               5-2
  4036.           ANIMATE            5-4
  4037.           BP                 5-5
  4038.           CALLSTACK          5-6
  4039.           DELETE             5-7
  4040.           DOS                5-9
  4041.           FIND               5-10
  4042.           GO                 5-11
  4043.           GOTO               5-12
  4044.           HELP               5-13
  4045.           INPUT              5-14
  4046.           LIST               5-15
  4047.           NEXT               5-16
  4048.           NUM                5-17
  4049.           OUTPUT             5-18
  4050.           PREV               5-19
  4051.           QUIT               5-20
  4052.           RESTART            5-21
  4053.           RESUME             5-22
  4054.           SPEED              5-23
  4055.           STEP               5-24
  4056.           TP                 5-25
  4057.           VIEW               5-26
  4058.           WP                 5-27
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.          Chapter 5 -- Command Reference
  4098.  
  4099.          Once you have become familiar with the features of The
  4100.          Clipper Debugger, you may want to bypass the menu system and
  4101.          enter commands directly.  To do this, simply type the command
  4102.          and press Return to execute.  No matter which window is
  4103.          active, the command will appear in the Command Window as you
  4104.          are typing.  Command results, if any, are also displayed in
  4105.          the Command Window.
  4106.  
  4107.          There are two sets of Debugger commands: the menu commands
  4108.          and the commands discussed in this chapter.  Any Debugger
  4109.          menu option can be expressed in the form of a menu command
  4110.          using the menu name followed by the first word of the option
  4111.          name.  If required, arguments are placed at the end of the
  4112.          menu command-line.
  4113.  
  4114.          This chapter explains the syntax and arguments of all other
  4115.          Debugger commands and offers examples of their use.
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.                                               Command Reference    5-1
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.          ?|??
  4164.          Display the value of an expression
  4165.  
  4166.          Syntax
  4167.  
  4168.             ? | ?? <exp>
  4169.             
  4170.          Arguments
  4171.  
  4172.             <exp> is the expression to be displayed.
  4173.  
  4174.          Description
  4175.  
  4176.             ? causes the value of the specified expression to be
  4177.             displayed in the Command Window.  ?? displays the value in a
  4178.             pop-up window which is closed by pressing Esc.  The
  4179.             expression used as the ?|?? command-line argument can be any
  4180.             valid Clipper expression, including user-defined function,
  4181.             arrays, and in-line assignments.
  4182.  
  4183.             When the display expression is a code block or an object, the
  4184.             value cannot actually be displayed.  For these data types, an
  4185.             icon is displayed instead.
  4186.  
  4187.             If the expression is an array, an icon is displayed if the
  4188.             array name is displayed with either ? or ??.  ??, however,
  4189.             will also display the array contents if you press Return in
  4190.             the first pop-up window.  To close both pop-ups, you must
  4191.             press Esc twice.  With ?, you can query individual array
  4192.             elements by subscripting the array name.
  4193.  
  4194.             The ability to display the return value of a user-defined
  4195.             function allows you to extend the abilities of The Clipper
  4196.             Debugger.  For example, you might want to modify the
  4197.             structure of a database file while debugging an application. 
  4198.             To do this, simply write a function to perform the
  4199.             modification, compile and link it with your application, and
  4200.             execute it using the ?|?? command.  Any feature that doesn't
  4201.             already exist can be written as a user-defined function and
  4202.             executed in this way.
  4203.  
  4204.             Using the in-line assignment (:=) operator with the ?|??
  4205.             command allows you to create new variables.
  4206.  
  4207.          Examples
  4208.  
  4209.             *  This example displays the value of a numeric field in the
  4210.                Command Window:
  4211.  
  4212.                > ? InvNum <Return>
  4213.                   465
  4214.                
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.                                               Command Reference    5-2
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.             *  This shows the result of an expression in the Command
  4230.                Window:
  4231.  
  4232.                > ? X = Y <Return>
  4233.                   .T.
  4234.                
  4235.             *  Here, the return value of a Clipper function is shown in
  4236.                the Command Window:
  4237.  
  4238.                > ? EOF() <Return>
  4239.                   .F.
  4240.  
  4241.             *  In this example, the EVAL() function is used to execute a
  4242.                code block:
  4243.  
  4244.                > ? EVAL(bSortBlock) <Return>
  4245.                
  4246.             *  This example creates a new PRIVATE variable called
  4247.                nPageNo, assigns it the value 2, and displays the variable
  4248.                in a pop-up window.  To close the window, press Esc:
  4249.  
  4250.                > ?? nPageNo := 2 <Return>
  4251.                
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.                                               Command Reference    5-3
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.          ANIMATE
  4296.          Run application in Animate Mode
  4297.  
  4298.          Syntax
  4299.  
  4300.             ANIMATE
  4301.             
  4302.          Description
  4303.  
  4304.             The ANIMATE command runs the application in Animate Mode. 
  4305.             This means that the debugger executes a single line, move the
  4306.             Execution Bar to the next line, execute it, and so on. If the
  4307.             Options:Exchange Screens menu option is ON, the output of
  4308.             each line is displayed after the line has been executed.
  4309.  
  4310.             This continues until a Breakpoint or Tracepoint is reached. 
  4311.             To control the speed of this process, use the SPEED command
  4312.             or the Run:Speed menu option.  Press any key to stop
  4313.             execution.  For more information on execution modes, see
  4314.             Chapter 4, Debugging a Program.
  4315.  
  4316.          See also:  Run:Animate, SPEED
  4317.  
  4318.  
  4319.  
  4320.  
  4321.  
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.  
  4330.  
  4331.  
  4332.  
  4333.  
  4334.  
  4335.  
  4336.  
  4337.  
  4338.  
  4339.  
  4340.  
  4341.  
  4342.  
  4343.  
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.                                               Command Reference    5-4
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.          BP
  4362.          Set a Breakpoint
  4363.  
  4364.          Syntax
  4365.  
  4366.             BP [AT] <lineNum> [[IN] <idProgramFile>]]
  4367.             BP <idFunction>  |  <idProcedure>
  4368.             
  4369.          Arguments
  4370.  
  4371.             <lineNum> is the line number where you want program execution
  4372.             to stop.
  4373.  
  4374.             <idProgramFile> is the filename of the program in which to
  4375.             set the Breakpoint.  If no extension is specified, (.prg) is
  4376.             assumed.
  4377.  
  4378.             <idFunction>|<idProcedure> is the name of the routine where
  4379.             you want program execution to stop.  Function names are
  4380.             specified without parentheses.
  4381.  
  4382.          Description
  4383.  
  4384.             BP designates a line of program code or a call to a routine
  4385.             as a Breakpoint.  This causes execution to pause as soon as
  4386.             the line is encountered or the routine is called.  To delete
  4387.             a Breakpoint, use the DELETE command.
  4388.  
  4389.             For more information on the use of Breakpoints, see Chapter
  4390.             4, Debugging a Program.
  4391.  
  4392.          Examples
  4393.  
  4394.             *  Entering:
  4395.  
  4396.                > BP 12 <Return>
  4397.                
  4398.                highlights line 12 of the program displayed in the Code
  4399.                Window.  Highlighted lines are those lines that have been
  4400.                designated as Breakpoints.
  4401.  
  4402.             *  This example inserts a Breakpoint at line 15 of File2.prg:
  4403.  
  4404.                > BP AT 15 IN File2.prg <Return>
  4405.                
  4406.             *  Here, a user-defined function is used as a Breakpoint. 
  4407.                Execution pauses as soon as the function is called:
  4408.  
  4409.                > BP TestUdf <Return>
  4410.                
  4411.          See also:  F9, DELETE, GO, LIST, STEP
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.                                               Command Reference    5-5
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.          CALLSTACK
  4428.          Control the Callstack Window
  4429.  
  4430.          Syntax
  4431.  
  4432.             CALLSTACK [on | OFF]
  4433.             
  4434.          Arguments
  4435.  
  4436.             ON opens the Callstack Window on the right-hand side of the
  4437.             screen.
  4438.  
  4439.             OFF closes the Callstack Window.
  4440.  
  4441.             If no options are specified, CALLSTACK acts as a toggle by
  4442.             changing the current status of the Callstack Window (e.g., if
  4443.             it is ON, CALLSTACK turns if OFF).
  4444.  
  4445.          Description 
  4446.  
  4447.             CALLSTACK toggles the display of the Callstack Window.  This
  4448.             window contains the Callstack: a list of pending activations
  4449.             with the current activation at the top.  For more information
  4450.             on the Callstack, see Chapter 4, Debugging a Program.
  4451.  
  4452.          Example
  4453.  
  4454.             *  To open the Callstack Window, enter:
  4455.  
  4456.                > CALLSTACK ON <Return>
  4457.                
  4458.             *  To close the window, type:
  4459.  
  4460.                > CALLSTACK OFF <Return>
  4461.                
  4462.          See also:  View:Callstack
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.  
  4486.                                               Command Reference    5-6
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.          DELETE
  4494.          Delete debugger settings
  4495.  
  4496.          Syntax
  4497.  
  4498.             DELETE ALL [BP | TP | WP]
  4499.             DELETE BP | TP | WP <number>
  4500.             
  4501.          Arguments
  4502.  
  4503.             ALL deletes all settings of a specified type or all settings
  4504.             if no type is specified.
  4505.  
  4506.             BP specifies Breakpoints.
  4507.  
  4508.             TP specifies Tracepoints.
  4509.  
  4510.             WP specifies Watchpoints.
  4511.  
  4512.             <number> is the number of the individual Watchpoint,
  4513.             Tracepoint, or Breakpoint to delete.
  4514.  
  4515.          Description
  4516.  
  4517.             DELETE deletes Watchpoints, Tracepoints, and Breakpoints,
  4518.             either individually or as a whole.  For a detailed
  4519.             explanation of these items, see Chapter 4, Debugging a
  4520.             Program.
  4521.  
  4522.             If you want to perform a single deletion, you must specify
  4523.             the number of the item to be deleted.  If not, DELETE opens a
  4524.             dialog box to prompt you for the item number.  For
  4525.             Watchpoints and Tracepoints, this is the number that appears
  4526.             on the left-hand side of the Watch Window.  For Breakpoints
  4527.             the LIST command must be used to determine the number.
  4528.  
  4529.          Examples
  4530.  
  4531.             *  To delete a Breakpoint, you must first find out where it
  4532.                falls in the list of Breakpoints:
  4533.  
  4534.                > LIST BP <Return>
  4535.                
  4536.                If the Breakpoint you want to delete is number three on
  4537.                the list, type:
  4538.  
  4539.                > DELETE BP 3 <Return>
  4540.                
  4541.                and the Breakpoint is deleted.
  4542.  
  4543.             *  This example deletes all Watchpoints:
  4544.  
  4545.                > DELETE ALL WP <Return>
  4546.                
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.                                               Command Reference    5-7
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.             *  Here, all Breakpoints, Tracepoints, and Watchpoints are
  4560.                deleted:
  4561.  
  4562.                > DELETE ALL <Return>
  4563.                
  4564.          See also:  F9, Point:Delete, BP, LIST, TP, WP
  4565.  
  4566.  
  4567.  
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.  
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.  
  4586.  
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.  
  4603.  
  4604.  
  4605.  
  4606.  
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.                                               Command Reference    5-8
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.          DOS
  4626.          Access DOS without leaving the current application
  4627.  
  4628.          Syntax
  4629.  
  4630.             DOS
  4631.             
  4632.       Description
  4633.  
  4634.          DOS loads a temporary copy of COMMAND.COM, allowing you to
  4635.          enter DOS commands without leaving the current application. 
  4636.          To return to the debugger, type "Exit" from the DOS
  4637.          command-line.
  4638.  
  4639.          When using this command, you must make sure sufficient memory
  4640.          is available to load COMMAND.COM and any additional programs
  4641.          you want to execute from the DOS command-line.  If the amount
  4642.          of memory is insufficient, an error message is displayed.
  4643.  
  4644.          See also:  File:DOS Access
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.                                               Command Reference    5-9
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.          FIND
  4692.          Locate a character string
  4693.  
  4694.          Syntax
  4695.  
  4696.             FIND <searchString>
  4697.             
  4698.          Arguments
  4699.  
  4700.             <searchString> is the character string you want to locate.
  4701.  
  4702.          Description
  4703.  
  4704.             FIND searches the file displayed in the Code Window for a
  4705.             specified search string.  If no search string is specified on
  4706.             the FIND command-line, a dialog box opens on the screen to
  4707.             prompt you for one.
  4708.  
  4709.             The search always begins at the first line of code and moves
  4710.             down through the file, regardless of the current cursor
  4711.             position in the Code Window.  If the search string is found,
  4712.             the Debugger moves the cursor to the line containing the
  4713.             first occurrence of the string in the Code Window; otherwise,
  4714.             the cursor remains at its current location.
  4715.  
  4716.             --------------------------------------------------------------
  4717.             Note
  4718.  
  4719.             If the Command Window is active when a FIND command is
  4720.             executed, you will not see the cursor move to its new
  4721.             location in the Code Window.  You must select the Code Window
  4722.             in order to see the new cursor position in the file.
  4723.             --------------------------------------------------------------
  4724.  
  4725.             This command obeys the Locate:Case Sensitive menu setting. 
  4726.             If Case Sensitive is ON (indicated by a check mark), FIND
  4727.             looks for a character string which matches the contents and
  4728.             case of the specified search string.  If OFF, only the
  4729.             contents need be the same.
  4730.  
  4731.          Examples
  4732.  
  4733.             If you suspect that the error you are trying to eliminate
  4734.             relates to a database (.dbf) file that is not open, search
  4735.             for the keyword "USE":
  4736.  
  4737.             > FIND USE <Return>
  4738.             
  4739.          See also:  Locate:Case Sensitive, Locate:Find, NEXT, PREV
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.                                              Command Reference    5-10
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.          GO
  4758.          Execute the application in Run Mode
  4759.  
  4760.          Syntax
  4761.  
  4762.             GO
  4763.             
  4764.          Description
  4765.  
  4766.             GO displays your application screen and executes the
  4767.             application until a Breakpoint or Tracepoint is reached, or
  4768.             until the Debugger is deliberately invoked (i.e., by pressing
  4769.             Alt-D or using ALTD()).  At that point, the debugger screen
  4770.             is redisplayed and program execution halts.  This is known as
  4771.             Run Mode.  Using GO again causes the application to be
  4772.             executed from the current position to the next Breakpoint or
  4773.             Tracepoint.  For more information on modes of execution and
  4774.             the use of Breakpoints and Tracepoints, see Chapter 4,
  4775.             Debugging a Program.
  4776.  
  4777.          Examples
  4778.  
  4779.             Suppose Breakpoints have been set at lines 15 and 30 of the
  4780.             current program.  Typing
  4781.  
  4782.             > GO <Return>
  4783.             
  4784.             executes the application as far as line 15.  Entering GO
  4785.             again executes up to line 30, and so on.
  4786.  
  4787.          See also:  F5, Run:Go
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.                                              Command Reference    5-11
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.          GOTO
  4824.          Move the cursor to a specified line in the Code Window
  4825.  
  4826.          Syntax
  4827.  
  4828.             GOTO <lineNum>
  4829.             
  4830.          Arguments
  4831.  
  4832.             <lineNum> is the number of the line where you want to move
  4833.             the cursor.
  4834.  
  4835.          Description
  4836.  
  4837.             GOTO moves the cursor from its current position in the Code
  4838.             Window to the specified line number.  If no line number is
  4839.             specified on the command-line, GOTO opens a dialog box to
  4840.             prompt you for one.
  4841.  
  4842.             GOTO moves to a specified line number regardless of whether
  4843.             or not line numbers are currently displayed in the Code
  4844.             Window.  However, for the sake of readability we recommend
  4845.             that line numbers be displayed.  For more information refer
  4846.             to the NUM command in this chapter.
  4847.  
  4848.             --------------------------------------------------------------
  4849.             Note
  4850.  
  4851.             If the Command Window is active when a GOTO command is
  4852.             executed, you will not see the cursor move to its new
  4853.             location in the Code Window.  You must select the Code Window
  4854.             in order to see the new cursor position in the file.
  4855.             --------------------------------------------------------------
  4856.  
  4857.          Examples
  4858.  
  4859.             This example moves the cursor to line 30 of the program
  4860.             currently being debugged:
  4861.  
  4862.             > GOTO 30 <Return>
  4863.             
  4864.          See also:  Locate:Goto Line
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.  
  4882.                                              Command Reference    5-12
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.          HELP
  4890.          Activate the Help Window
  4891.  
  4892.          Syntax
  4893.  
  4894.             HELP
  4895.             
  4896.          Description
  4897.  
  4898.             The Debugger Help Window is divided into two panes: the left
  4899.             pane contains a list of topics for which help is available,
  4900.             and the right pane contains the help text for the currently
  4901.             highlighted topic.  When the Help Window is activated with
  4902.             the HELP command, About Help is highlighted on the left with
  4903.             a very general discussion of navigation within the Help
  4904.             Window.
  4905.  
  4906.             Moving the highlight bar using Uparrow or DnArrow selects a
  4907.             new help topic.  PgUp and PgDn page through the associated
  4908.             help text on the right.  Esc closes the Help Window and
  4909.             returns you to the main Debugger screen.
  4910.  
  4911.             Note that the Help menu can also be used to activate the Help
  4912.             Window.  Each option in this menu activates the Help Window
  4913.             with a particular topic that is highlighted when the window
  4914.             opens.  For example Help:Commands displays the help screen
  4915.             for the Debugger commands.
  4916.  
  4917.             For more information on the Help Window, see Chapter 3, The
  4918.             Debugger Display.
  4919.  
  4920.          See also:   F1, Help:Commands, Help:Keys, Help:Menus,
  4921.                      Help:Windows
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.                                              Command Reference    5-13
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.          INPUT
  4956.          Read commands from a script file
  4957.  
  4958.          Syntax
  4959.  
  4960.             INPUT <idScriptFile>
  4961.             
  4962.          Arguments
  4963.  
  4964.             <idScriptFile> is the name of the script file from which to
  4965.             read commands.  If no extension is specified, (.cld) is
  4966.             assumed.
  4967.  
  4968.          Description
  4969.  
  4970.             INPUT causes the debugger to temporarily suspend input from
  4971.             the keyboard and begin reading commands from the specified
  4972.             script file instead.  All commands in this file are read and
  4973.             executed.  For a full explanation of script files and their
  4974.             uses, see Chapter 2, Starting the Debugger.
  4975.  
  4976.             If no filename is entered on the command-line, INPUT opens a
  4977.             dialog box to prompt you for one.
  4978.  
  4979.          Examples
  4980.  
  4981.             To execute the commands in the script file "ViewBug.cld",
  4982.             enter the following:
  4983.  
  4984.             > INPUT ViewBug<Return>
  4985.             
  4986.          See also:  Options:Restore Settings
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.  
  5013.  
  5014.                                              Command Reference    5-14
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.  
  5021.          LIST
  5022.          List Watchpoints, Tracepoints, and Breakpoints
  5023.  
  5024.          Syntax
  5025.  
  5026.             LIST BP | TP | WP
  5027.             
  5028.          Description
  5029.  
  5030.             LIST displays all Watchpoints, Tracepoints, or Breakpoints in
  5031.             the Command Window.  For more information on the setting and
  5032.             deleting of these items, see Chapter 4, Debugging a Program.
  5033.  
  5034.          Examples
  5035.  
  5036.             *  If there are Breakpoints at lines 10 and 15 of AddData.prg
  5037.                and lines 2 and 6 of ViewData.prg, LIST BP displays the
  5038.                following:
  5039.  
  5040.                0) 10 ADDDATA.PRG
  5041.                1) 15 ADDDATA.PRG
  5042.                2) 2 VIEWDATA.PRG
  5043.                3) 6 VIEWDATA.PRG
  5044.                
  5045.             *  To list all Watchpoints, type:
  5046.  
  5047.                > LIST WP <Return>
  5048.                
  5049.          See also:  BP, DELETE, TP, WP
  5050.  
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.  
  5080.                                              Command Reference    5-15
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.          NEXT
  5088.          Locate the next occurrence of a character string
  5089.  
  5090.          Syntax
  5091.  
  5092.             NEXT
  5093.             
  5094.          Description
  5095.  
  5096.             NEXT locates the next occurrence of the most recently defined
  5097.             search string.  A search string is defined using the FIND
  5098.             command or the Locate:Find menu option.  If no search string
  5099.             has been defined, NEXT opens a dialog box to prompt you for
  5100.             one.
  5101.  
  5102.             The search begins at the current cursor position in the Code
  5103.             Window and moves down through the file.  If a match is found,
  5104.             the Debugger moves the cursor to the line containing the next
  5105.             occurrence of the string; otherwise, the cursor remains at
  5106.             its current location.  Like FIND, NEXT obeys the Locate:Case
  5107.             Sensitive menu setting.
  5108.  
  5109.             --------------------------------------------------------------
  5110.             Note
  5111.  
  5112.             If the Command Window is active when a NEXT command is
  5113.             executed, you will not see the cursor move to its new
  5114.             location in the Code Window.  You must select the Code Window
  5115.             in order to see the new cursor position in the file.
  5116.             --------------------------------------------------------------
  5117.  
  5118.          See also:  Locate:Case Sensitive, Locate:Next, FIND, PREV
  5119.  
  5120.  
  5121.  
  5122.  
  5123.  
  5124.  
  5125.  
  5126.  
  5127.  
  5128.  
  5129.  
  5130.  
  5131.  
  5132.  
  5133.  
  5134.  
  5135.  
  5136.  
  5137.  
  5138.  
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.  
  5145.  
  5146.                                              Command Reference    5-16
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.          NUM
  5154.          Toggle the display of line numbers
  5155.  
  5156.          Syntax
  5157.  
  5158.             NUM [ON | off]
  5159.             
  5160.          Arguments
  5161.  
  5162.             ON displays the line number at the beginning of each line of
  5163.             code.
  5164.  
  5165.             OFF removes the line numbers.
  5166.  
  5167.             If no options are specified, NUM acts as a toggle by changing
  5168.             the line number status.
  5169.  
  5170.          Description
  5171.  
  5172.             NUM toggles the display of line numbers at the beginning of
  5173.             each line of code in the Code Window.  When you first start
  5174.             the debugger, NUM is ON and line numbers are displayed.  This
  5175.             is particularly useful when using the GOTO command to move
  5176.             the cursor to a certain line in the Code Window.
  5177.  
  5178.          See also:  Options:Line Numbers
  5179.  
  5180.  
  5181.  
  5182.  
  5183.  
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.                                              Command Reference    5-17
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.          OUTPUT
  5220.          Display program output
  5221.  
  5222.          Syntax
  5223.  
  5224.             OUTPUT
  5225.             
  5226.          Description
  5227.  
  5228.             OUTPUT temporarily clears the debugger screen and displays
  5229.             your application screen in its place.  This allows you to see
  5230.             the output of the current program in the context of the
  5231.             application itself.  To return to the original screen, press
  5232.             any key.
  5233.  
  5234.          See also:  F4, View:App Screen
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.  
  5251.  
  5252.  
  5253.  
  5254.  
  5255.  
  5256.  
  5257.  
  5258.  
  5259.  
  5260.  
  5261.  
  5262.  
  5263.  
  5264.  
  5265.  
  5266.  
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.  
  5277.  
  5278.                                              Command Reference    5-18
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.          PREV
  5286.          Locate the previous occurrence of a character string
  5287.  
  5288.          Syntax
  5289.  
  5290.             PREV
  5291.             
  5292.          Description
  5293.  
  5294.             PREV searches for the previous occurrence of the most
  5295.             recently defined search string.  A search string is defined
  5296.             using the FIND command or the Locate:Find menu option.  If no
  5297.             search string has been defined, PREV opens a dialog box to
  5298.             prompt you for one.
  5299.  
  5300.             The search begins at the current cursor position in the Code
  5301.             Window and moves up through the file.  If a match is found,
  5302.             the Debugger moves the cursor to the line containing the
  5303.             previous occurrence of the string; otherwise, the cursor
  5304.             remains at its current location.  Like FIND, PREV obeys the
  5305.             Locate:Case Sensitive menu setting.
  5306.  
  5307.             --------------------------------------------------------------
  5308.             Note
  5309.  
  5310.             If the Command Window is active when a PREV command is
  5311.             executed, you will not see the cursor move to its new
  5312.             location in the Code Window.  You must select the Code Window
  5313.             in order to see the new cursor position in the file.
  5314.             --------------------------------------------------------------
  5315.  
  5316.          See also:  Locate:Case Sensitive, Locate:Previous, FIND, NEXT
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.  
  5344.                                              Command Reference    5-19
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.          QUIT
  5352.          Exit the debugger
  5353.  
  5354.          Syntax
  5355.  
  5356.             QUIT
  5357.             
  5358.          Description
  5359.  
  5360.             QUIT terminates the debugger, closes all files and returns to
  5361.             DOS.
  5362.  
  5363.          See also:  File:Exit
  5364.  
  5365.  
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.  
  5378.  
  5379.  
  5380.  
  5381.  
  5382.  
  5383.  
  5384.  
  5385.  
  5386.  
  5387.  
  5388.  
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.                                              Command Reference    5-20
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.          RESTART
  5418.          Reload the current application again
  5419.  
  5420.          Syntax
  5421.  
  5422.             RESTART
  5423.             
  5424.          Description
  5425.  
  5426.             RESTART reloads the current application in preparation to be
  5427.             re-executed, keeping intact all debugger settings.  This
  5428.             command is the only way to execute an application which has
  5429.             already been run.
  5430.  
  5431.          Examples
  5432.  
  5433.             In this example, the current application is executed:
  5434.  
  5435.             > GO <Return>
  5436.             
  5437.             If errors are discovered, you may want to make changes and
  5438.             run the application again:
  5439.  
  5440.             > RESTART <Return>
  5441.             
  5442.          See also:  Run:Restart
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.                                              Command Reference    5-21
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.          RESUME
  5484.          Return from viewing a file
  5485.  
  5486.          Syntax
  5487.  
  5488.             RESUME  |  .
  5489.             
  5490.          Description
  5491.  
  5492.             RESUME clears the file being viewed with the VIEW command (or
  5493.             using the Callstack Window) and redisplays the file
  5494.             originally shown in the Code Window.  Any Breakpoints which
  5495.             have been set are saved.
  5496.  
  5497.             The period (.) is a synonym for the RESUME command.
  5498.  
  5499.          Examples
  5500.  
  5501.             Suppose the program currently being debugged is called
  5502.             PrintData.prg.  The following line temporarily removes
  5503.             PrintData.prg from the screen and displays ReportHead.prg in
  5504.             its place:
  5505.  
  5506.             > VIEW ReportHead.prg <Return>
  5507.             
  5508.             To return to PrintData.prg, type the following:
  5509.  
  5510.             > RESUME <Return>
  5511.             
  5512.          See also:  File:Resume, VIEW
  5513.  
  5514.  
  5515.  
  5516.  
  5517.  
  5518.  
  5519.  
  5520.  
  5521.  
  5522.  
  5523.  
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.                                              Command Reference    5-22
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.          SPEED
  5550.          Set step delay for Animate Mode
  5551.  
  5552.          Syntax
  5553.  
  5554.             SPEED <delay>
  5555.             
  5556.          Arguments
  5557.  
  5558.             <delay> is the increment of delay for animation in tenths of
  5559.             seconds.
  5560.  
  5561.          Description
  5562.  
  5563.             SPEED controls the speed of display while in Animate Mode
  5564.             (for an explanation of this mode, see Chapter 4, Debugging a
  5565.             Program).  If no argument is specified, SPEED opens a dialog
  5566.             box which displays the current setting and allows you to
  5567.             enter a new setting.
  5568.  
  5569.             Remember that this setting is expressed in tenths of seconds
  5570.             so that smaller settings are faster than larger ones.
  5571.  
  5572.          See also:  Run:Speed, ANIMATE
  5573.  
  5574.  
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.  
  5582.  
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.                                              Command Reference    5-23
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.          STEP
  5616.          Execute the current program in single step mode
  5617.  
  5618.          Syntax
  5619.  
  5620.             STEP
  5621.             
  5622.          Description
  5623.  
  5624.             STEP executes the current program in single step mode.  This
  5625.             means that it executes the line of code at the Execution Bar,
  5626.             moves the Execution Bar to the next line, and stops.
  5627.  
  5628.          Examples
  5629.  
  5630.             This example executes the next line of the application being
  5631.             debugged:
  5632.  
  5633.             > STEP <Return>
  5634.             
  5635.             The debugger stops with the Execution Bar on the next line to
  5636.             be executed.
  5637.  
  5638.          See also:  F8, Run:Step
  5639.  
  5640.  
  5641.  
  5642.  
  5643.  
  5644.  
  5645.  
  5646.  
  5647.  
  5648.  
  5649.  
  5650.  
  5651.  
  5652.  
  5653.  
  5654.  
  5655.  
  5656.  
  5657.  
  5658.  
  5659.  
  5660.  
  5661.  
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.  
  5668.  
  5669.  
  5670.  
  5671.  
  5672.  
  5673.  
  5674.                                              Command Reference    5-24
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.          TP
  5682.          Specify a variable or expression as a Tracepoint
  5683.  
  5684.          Syntax
  5685.  
  5686.             TP <exp>
  5687.             
  5688.          Arguments
  5689.  
  5690.             <exp> is the field variable, memory variable or expression to
  5691.             be traced.  It can be of any data type.
  5692.  
  5693.          Description
  5694.  
  5695.             TP designates the specified variable or expression as a
  5696.             Tracepoint.  If no expression is specified on the
  5697.             command-line, TP opens a dialog box to prompt you for one. 
  5698.             The Tracepoint is then added to the list in the Watch Window.
  5699.  
  5700.             A Tracepoint can be thought of as a conditional Breakpoint. 
  5701.             The two are very similar, except that a Tracepoint halts
  5702.             program execution as soon as its value changes.  For more
  5703.             information on Tracepoints, see Chapter 4, Debugging a
  5704.             Program.
  5705.  
  5706.          Examples
  5707.  
  5708.             *  This example halts execution as soon as the value of the
  5709.                variable nInvNum changes:
  5710.  
  5711.                > TP nInvNum <Return>
  5712.                
  5713.             *  This pauses when end-of-file is reached:
  5714.  
  5715.                > TP EOF() <Return>
  5716.                
  5717.             *  This example halts as soon as the value of i exceeds 10,
  5718.                and is very useful in looping operations:
  5719.  
  5720.                > TP i > 10 <Return>
  5721.                
  5722.          See also:  Point:Tracepoint, DELETE, LIST
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.  
  5739.  
  5740.                                              Command Reference    5-25
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.  
  5747.          VIEW
  5748.          Examine a file during the current debugging session
  5749.  
  5750.          Syntax
  5751.  
  5752.             VIEW <idFileName>
  5753.             
  5754.          Arguments
  5755.  
  5756.             <idFileName> is the name of the file you want to examine.
  5757.  
  5758.          Description
  5759.  
  5760.             VIEW allows you to look at other files without leaving the
  5761.             current debugging session.  It can also be used to view
  5762.             header files specified with the #include pre-processor
  5763.             directive.  Breakpoints can be set and are saved when you
  5764.             return to the original program.
  5765.  
  5766.             If no filename is specified on the command-line, VIEW opens a
  5767.             dialog box to prompt you for one.
  5768.  
  5769.          Examples
  5770.  
  5771.             *  To view ListDbfs.prg from within the current program
  5772.                (EnterData.prg), type:
  5773.  
  5774.                > VIEW ListDbfs.prg <Return>
  5775.                
  5776.             *  It is possible to continue viewing other programs without
  5777.                returning to the original program.  For example:
  5778.  
  5779.                > VIEW PrintDbfs.prg <Return>
  5780.                
  5781.                loads PrintDbfs.prg in place of ListDbfs.prg.  Typing
  5782.                RESUME returns the debugger to EnterData.prg--the original
  5783.                program.
  5784.  
  5785.          See also:  File:Open, RESUME
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.  
  5800.  
  5801.  
  5802.  
  5803.  
  5804.  
  5805.  
  5806.                                              Command Reference    5-26
  5807.  
  5808.  
  5809.  
  5810.  
  5811.  
  5812.  
  5813.          WP
  5814.          Specify a variable or expression as a Watchpoint
  5815.  
  5816.          Syntax
  5817.  
  5818.             WP <exp>
  5819.             
  5820.          Arguments
  5821.  
  5822.             <exp> is the field variable, memory variable or expression to
  5823.             be watched and can be of any data type.
  5824.  
  5825.          Description
  5826.  
  5827.             WP designates the specified variable or expression as a
  5828.             Watchpoint.  If no expression is specified on the
  5829.             command-line, WP opens a dialog box to prompt you for one. 
  5830.             The Watchpoint is then added to the list in the Watch Window
  5831.             where it is updated as each line of code is executed.
  5832.  
  5833.             A Watchpoint is identical to a Tracepoint, except that it
  5834.             does not cause a break in program execution every time its
  5835.             value changes.  For more information on Watchpoints, see
  5836.             Chapter 4, Debugging a Program.
  5837.  
  5838.          Examples
  5839.  
  5840.             *  This example specifies the field CustNum as a Watchpoint:
  5841.  
  5842.                > WP CustNum <Return>
  5843.                
  5844.                CustNum now appears in the Watch Window.
  5845.  
  5846.             *  In this example, the current record number is displayed as
  5847.                each line of code is executed:
  5848.  
  5849.                > WP RECNO() <Return>
  5850.                
  5851.          See also:  Point:Watchpoint, DELETE, LIST
  5852.  
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.  
  5872.                                              Command Reference    5-27
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.          Glossary
  5880.  
  5881.  
  5882.          Active Window                     Cursor
  5883.                                            
  5884.          The window where all              The cursor indicates the
  5885.          keystrokes (except those valid    current line and/or column
  5886.          in the Command Window) apply.     position in the active window
  5887.          An active window is indicated     or dialog box.  Note that some
  5888.          by a highlighted border.  The     windows, such as the Monitor
  5889.          Tab and Shift-Tab keys are used   Window, do not utilize the
  5890.          to select the next and previous   cursor.  When a window that
  5891.          window, respectively.             does not utilize the cursor is
  5892.                                            active, the cursor appears in
  5893.          Animate Mode                      the Code Window.
  5894.                                            
  5895.          The mode of execution in which    Debugger
  5896.          an application runs one line at   
  5897.          a time until a Breakpoint or      A tool used to track down
  5898.          Tracepoint is reached, with the   errors in a program.
  5899.          Execution Bar moving to each      
  5900.          line as it is executed.           Dialog box
  5901.                                            
  5902.          Breakpoint                        A box displayed from within the
  5903.                                            debugger whenever further input
  5904.          A point at which an application   is required.
  5905.          pauses execution and returns      
  5906.          control to the debugger.          Execution Bar
  5907.                                            
  5908.          Callstack                         The highlight bar which is
  5909.                                            positioned on the line of code
  5910.          A list containing the names of    to be executed next.
  5911.          all pending activations at the    
  5912.          current point in an               Help Window
  5913.          application.                      
  5914.                                            The window in which on-line
  5915.          Callstack Window                  help is displayed.
  5916.                                            
  5917.          The window in which the           Inspecting
  5918.          Callstack is displayed.           
  5919.                                            The process of examining work
  5920.          Code Window                       areas, variables, expressions
  5921.                                            and activations inside the
  5922.          The window in which source code   debugger.
  5923.          is displayed.                     
  5924.                                            Menu Bar
  5925.          Command Window                    
  5926.                                            The bar at the top of the
  5927.          The window in which commands      debugger screen, on which the
  5928.          are displayed and entered.        available menu choices are
  5929.                                            displayed.
  5930.                                            
  5931.                                            
  5932.                                            
  5933.  
  5934.  
  5935.  
  5936.  
  5937.  
  5938.                                          Clipper Debugger Glossary    G-1
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.          Monitor Window                    Tracepoint
  5947.                                            
  5948.          The window in which monitored     A variable or expression whose
  5949.          variables are displayed.          value is displayed in the Watch
  5950.                                            Window, and which causes an
  5951.          Monitored variable                application to pause whenever
  5952.                                            that value changes.
  5953.          A variable which is selected by   
  5954.          the options on the Monitor Menu   View Sets Window
  5955.          and displayed in the Monitor      
  5956.          Window.                           The window in which Clipper
  5957.                                            status settings can be
  5958.          Run Mode                          inspected.
  5959.                                            
  5960.          The mode of execution in which    View Workareas Window
  5961.          an application executes without   
  5962.          pausing, until a Breakpoint or    The window in which work area
  5963.          Tracepoint is reached.            information is displayed.
  5964.                                            
  5965.          Script File                       Watch Window
  5966.                                            
  5967.          A file in which frequently used   The window in which Watchpoints
  5968.          debugger commands are stored      and Tracepoints are displayed.
  5969.          and from which those commands     
  5970.          can be executed.                  Watchpoint
  5971.                                            
  5972.          Set Colors Window                 A variable or expression whose
  5973.                                            value is displayed in the Watch
  5974.          The window in which the           Window and updated as an
  5975.          Debugger color settings can be    application executes.
  5976.          inspected.                        
  5977.                                            
  5978.          Single Step Mode                  
  5979.                                            
  5980.          The mode of execution in which    
  5981.          only the line of code             
  5982.          highlighted by the Execution      
  5983.          Bar is executed, and its output   
  5984.          displayed.                        
  5985.                                            
  5986.          Trace Mode                        
  5987.                                            
  5988.          A mode of execution similar to    
  5989.          Single Step Mode, the             
  5990.          difference being that Trace       
  5991.          Mode traces over function and     
  5992.          procedure calls.                  
  5993.                                            
  5994.                                            
  5995.                                            
  5996.                                            
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.  
  6003.  
  6004.                                          Clipper Debugger Glossary    G-2
  6005.  
  6006.  
  6007.