forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
110 lines
33 KiB
HTML
110 lines
33 KiB
HTML
<a name="EN-US_TOPIC_0000001188202610"></a><a name="EN-US_TOPIC_0000001188202610"></a>
|
|
|
|
<h1 class="topictitle1">Using Breakpoints</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p1553422165222">This section contains the following topics:</p>
|
|
<ul id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ul60193704171156"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li29529510171156"><a href="#EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section7797521165554">Using the Breakpoints Pane</a></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li65988017129"><a href="#EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section102263371586">Setting or Adding Breakpoints on a Row</a></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li30499464171217"><a href="#EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section2403313617042">Enabling or Disabling a Breakpoint on a Row</a></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li20608519171222"><a href="#EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section6545757217250">Removing a Breakpoint on a Row</a></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li36405278171229"><a href="#EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section3380880717344">Changing Source Code</a></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li28909143171239"><a href="#EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section18232123785817">Debugging a PL/SQL Program Using a Breakpoint</a></li></ul>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p14049919165330">A breakpoint is used to suspend the execution of a PL/SQL program at the row where the breakpoint is set. You can use breakpoints to control the execution and debug the function.</p>
|
|
<ul id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ul59340412165330"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li64301663165330">An enabled breakpoint suspends the execution of the PL/SQL program whenever a breakpoint is encountered. When the execution hits the row of breakpoint, the execution will stop and you will be able to carry out other debug operations. Data Studio supports the following breakpoint operations:<ul id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ul41844057165330"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li41052195165330">Setting or adding breakpoint on a row</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li33925438165330">Enabling or disabling a breakpoint on a row</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li36893492165330">Removing a breakpoint on a row</li></ul>
|
|
</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li63605972165330">A disabled breakpoint will not suspend execution of PL/SQL program.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p35582841165330">When you run a PL/SQL program, the execution pauses at every row where you set a breakpoint. When the program execution is paused, Data Studio retrieves information about the current program state, such as the values of the program variables.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p51810114165330">Perform the following steps to debug a PL/SQL program:</p>
|
|
<ol id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ol4486900165339"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li40382103165339"><span>Set a breakpoint at the row where PL/SQL program execution should be paused.</span></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li6614740816546"><span>Start the debugging session.</span><p><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p26880704165434">When a row with a breakpoint is reached, monitor the state of the application in the debugger pane, and continue the execution.</p>
|
|
</p></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li36980684165411"><span>Close the debugging session.</span></li></ol>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p46909993165516">Data Studio provides debugging options in the toolbar that helps you step through the debug objects.</p>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section7797521165554"><a name="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section7797521165554"></a><a name="en-us_topic_0185264940_section7797521165554"></a><h4 class="sectiontitle">Using the Breakpoints Pane</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p63140893165612">You can use the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b14847872">Breakpoints</strong> pane to view and manage the currently set breakpoints. From the minimized window panel, click the breakpoint option to open the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b91413017502">Breakpoints</strong> pane.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p60139716165612">The <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b61826996">Breakpoints</strong> pane lists each breakpoint with the row number and the debug object name.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p39478833165612">You can enable or disable all the breakpoints by clicking <span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image41832375" src="figure/en-us_image_0000001233800957.png"></span> in the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b40947060">Breakpoints</strong> pane. You can enable, disable or remove a specific breakpoint by selecting the breakpoint check box and clicking <span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image189884390818" src="figure/en-us_image_0000001188521356.jpg"></span>, <span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image1876295016100" src="figure/en-us_image_0000001234042389.jpg"></span> or <span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image1164813386121" src="figure/en-us_image_0000001233800955.jpg"></span> in the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b16880438">Breakpoints</strong> pane.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p15266149165612">Double-click the required breakpoint in the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b22358245173648">Breakpoint Info</strong> column to locate the breakpoint in the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b11681561161051">PL/SQL Viewer</strong> pane.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p1479162016284"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image6793207287" src="figure/en-us_image_0000001233800779.jpg"></span></p>
|
|
<div class="note" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_note43179391165632"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ul7521634165643"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li585842165643">Disabling a breakpoint prevents the execution from pausing at the breakpoint, but leaves the definition in place (to enable the breakpoint later).</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li5272584165643">Deleting a breakpoint removes it permanently.</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li31697881165648">The content of the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b53313577">Breakpoints</strong> pane can be copied to the clipboard using <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b3750955163347">Alt</strong>+<strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b1056086163351">Y</strong>.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section102263371586"><a name="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section102263371586"></a><a name="en-us_topic_0185264940_section102263371586"></a><h4 class="sectiontitle">Setting or Adding Breakpoints on a Row</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p35596959165721">Follow the steps to set or add breakpoints on a row:</p>
|
|
<ol id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ol52972441165728"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li6989923165728"><span>Open the PL/SQL function on a row where you want to add a breakpoint.</span></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li42960491165938"><span>In the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b0820217536">PL/SQL Viewer</strong>, double-click the breakpoint ruler on the left side of the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b44361221185217">Line</strong> column. The added breakpoint is indicated by an enable breakpoint sign [<span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image148224394469" src="figure/en-us_image_0000001233922445.png"></span>] in the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b1215795625211">PL/SQL Viewer</strong>.</span><p><div class="note" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_note561163117014"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p2238292717028">If the execution of the function does not break or stop the breakpoint during debugging, the breakpoint that is already set will not be validated.</p>
|
|
</div></div>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section2403313617042"><a name="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section2403313617042"></a><a name="en-us_topic_0185264940_section2403313617042"></a><h4 class="sectiontitle">Enabling or Disabling a Breakpoint on a Row</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p5591424917057">Once a breakpoint is set, you can temporarily disable it by selecting the corresponding check box in the left-side of the <strong id="EN-US_TOPIC_0000001188202610__b112344562168">Breakpoints</strong> pane and clicking <span><img id="EN-US_TOPIC_0000001188202610__image1723585610163" src="figure/en-us_image_0000001188202836.jpg"></span> at the top of the <strong id="EN-US_TOPIC_0000001188202610__b123575610168">Breakpoints</strong> pane. Disabled breakpoints will be grayed out [<span><img id="EN-US_TOPIC_0000001188202610__image553419183176" src="figure/en-us_image_0000001188202836.jpg"></span>] in the <strong id="EN-US_TOPIC_0000001188202610__b1553581820173">PL/SQL Viewer</strong> and <strong id="EN-US_TOPIC_0000001188202610__b195351618101713">Breakpoints</strong> pane. To enable a disabled breakpoint, select the corresponding breakpoint (using check box) and click <span><img id="EN-US_TOPIC_0000001188202610__image869314258177" src="figure/en-us_image_0000001188202840.png"></span>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section6545757217250"><a name="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section6545757217250"></a><a name="en-us_topic_0185264940_section6545757217250"></a><h4 class="sectiontitle">Removing a Breakpoint on a Row</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p595183101733">You can remove an unused breakpoint using the same method as that for creating a breakpoint.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p659027501733">In the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b11746998164213">PL/SQL Viewer</strong> tab, open the function in which you want to remove the breakpoint. Double-click <span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image165951537141416" src="figure/en-us_image_0000001188521354.png"></span> in the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b52529705174147">PL/SQL Viewer</strong> to disable the breakpoint. The breakpoint is removed from the work area.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p365225421733">You can also enable or disable breakpoints using the preceding method.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section3380880717344"><a name="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section3380880717344"></a><a name="en-us_topic_0185264940_section3380880717344"></a><h4 class="sectiontitle">Changing Source Code</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p368116841743">During debugging, if the source code is changed after it is fetched from the server and the debugging is continued, Data Studio displays an error.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p4431388117419">You are advised to refresh the object and perform the debug operation again.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_note393588917426"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p16479113011615">If the source code is changed after it is fetched from the server, and if you perform the execution or debug operation with no breakpoint set, then the result of the source code at the server will be displayed on Data Studio. You are advised to refresh before performing debug or execute operation.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section18232123785817"><a name="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section18232123785817"></a><a name="en-us_topic_0185264940_section18232123785817"></a><h4 class="sectiontitle">Debugging a PL/SQL Program Using a Breakpoint</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p99871006259">Perform the following steps to debug a PL/SQL program using a breakpoint:</p>
|
|
<ol id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ol4188765717513"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li4144459917513"><span>Open the PL/SQL program and add a breakpoint on the row to be debugged.</span><p><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p7874989171013">An example is as follows:</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p118783611235">Rows 11, 12, 13</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p31544646171014"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image336571616284" src="figure/en-us_image_0000001188681106.jpg"></span></p>
|
|
</p></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li3338444817525"><span>To start debugging, click <span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image63502565" src="figure/en-us_image_0000001188362800.jpg"></span> or press <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b34652178">Ctrl</strong>+<strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b43434153">D</strong>, or right-click the selected PL/SQL program in the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b55363057">Object Browser</strong> and select <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b28505468">Debug</strong>. In the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b55222628">Debug Function/Procedure</strong> dialog box, enter the parameter information.</span><p><div class="note" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_note2479706417654"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p238284131773">If there is no input parameter, the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b59086710">Debug Function/Procedure</strong> dialog box will not be displayed.</p>
|
|
</div></div>
|
|
</p></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li6175664817720"><span>Enter the information and click <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b47107601">OK</strong>. Single quotation marks (') are mandatory for the parameters of <strong id="EN-US_TOPIC_0000001188202610__b17271345244">varchar</strong> and <strong id="EN-US_TOPIC_0000001188202610__b491612471649">date</strong> data types, but not mandatory for the parameters of <strong id="EN-US_TOPIC_0000001188202610__b7450856549">numeric</strong> data type.</span><p><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p1947285917727">To set NULL as the parameter value, enter <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b101576411542">NULL</strong> or <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b121036471546">null</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p4298529317742">On clicking the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b12347112">Debug</strong> button, you will see an arrow <span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image44015150" src="figure/en-us_image_0000001234200879.jpg"></span> pointing to the row where the breakpoint is set. The arrow indicates the row number at which execution will resume from.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p156761919153119"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image1867641919313" src="figure/en-us_image_0000001234042211.jpg"></span></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p31275317757">You can terminate debugging by clicking <span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image13958703" src="figure/en-us_image_0000001234042385.jpg"></span> from the toolbar, or pressing <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b38599539182844">F10</strong>, or select <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b58519467">Terminate Debugging</strong> from the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b56913160">Debug</strong> menu. After the debugging is complete, the function execution proceeds and will not be terminated at any breakpoint.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p177188841788">The <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b46563282">Callstack</strong> and <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b16416361">Variables</strong> panes are populated.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p6112518917822"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image1434216617823" src="figure/en-us_image_0000001188521176.jpg"></span></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p141057714010"></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p2755406017831">The <strong id="EN-US_TOPIC_0000001188202610__b10765201911209">Variables</strong> pane shows the current value of variables. Mouse over the variable in the function/procedure also shows the current value of variables.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p203081513502"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image03081556507" src="figure/en-us_image_0000001233922273.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p5893420917743"></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p4874155710242">You can step through the code using <strong id="EN-US_TOPIC_0000001188202610__b149552381206">Step Into</strong>, <strong id="EN-US_TOPIC_0000001188202610__b29551238132020">Step Out</strong> or <strong id="EN-US_TOPIC_0000001188202610__b695543811205">Step Over</strong>. For details, see <a href="DWS_DS_623.html">Controlling Execution</a>.</p>
|
|
</p></li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li3208205111246"><span>Click <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b16647026">Continue</strong><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image15605512" src="figure/en-us_image_0000001234200877.jpg"></span> to continue the execution till the next breakpoint (if any). The result of the executed PL/SQL program is displayed in the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b6231886">Result</strong> tab and the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b56086982">Callstack</strong> and <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b35020791">Variables</strong> panes are cleared. You can copy the content of the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b46751668">Result</strong> tab, by clicking <span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image18111828" src="figure/en-us_image_0000001188362804.jpg"></span>.</span><p><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p82083513247">To remove the breakpoint, do the following:</p>
|
|
<ul id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ul192081451102411"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li1320812518245">Double-click again on the breakpoint to remove it from the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b28928332174213">PL/SQL Viewer</strong>.</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li1720875112417">Select the breakpoint in the breakpoint check box and click <span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image57587449185458" src="figure/en-us_image_0000001233800939.jpg"></span> in the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b47951145">Breakpoints</strong> pane.</li></ul>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section990535995214"><h4 class="sectiontitle">Rearranging the Variable Window</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p11716145751919">This feature enables the Variable Window and columns to be rearranged. You are able to arrange Variable Window to the following places:</p>
|
|
<ul id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ul2053401472518"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li185340149259">Next to the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b184172881516">SQL Assistant</strong> tab</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li2406101711267">Next to the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b19849205031617">SQL Terminal</strong> tab</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li165782618266">Next to the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b598211546164">Object Browser</strong> tab</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li2619342102611">Next to the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b1211345891618">Resultset</strong> tab</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li9712136182716">Next to the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b17684142191718">Breakpoints</strong> tab</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li7601456103411">Next to the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b21106721711">Callstack</strong> tab</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li163691742173612">Next to the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b2026671119173">Object Browser</strong> tab</li></ul>
|
|
<div class="note" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_note19141144710710"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p584716501887">When debugging is finished, the variable window will be minimized even if the variable window is rearranged while debugging. If variable window is rearranged as the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b753274915177">Terminal</strong> tab or the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b6313165311716">Result</strong> tab, on completion of debugging, the tab should be minimized manually. The position of variable window is maintained after it is rearranged.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section1411151454214"><h4 class="sectiontitle">Enabling/Disabling System Variables</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p153342012495">System Variables are displayed by default. You can disable the system variables whenever required.</p>
|
|
<ol id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ol1283732135412"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li6837152113544"><span>Click the red button under <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b1661816391189">Variables</strong> to disable system variables.</span><p><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p2949120973"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image149498201074" src="figure/en-us_image_0000001233800777.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p17475338305">The button is in <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b1477915131911">ON</strong> state by default.</p>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section3374121315194"><h4 class="sectiontitle">Displaying Cached Parameters</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p1454143311214">When a PL/SQL function or procedure is debugged or executed, the same parameter values are used for the next debugging or execution.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p2470329132015">While executing a PL/SQL object, following window is displayed:</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p14903451105314"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image79033516533" src="figure/en-us_image_0000001233922279.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p93343333210">For the first time, parameter values are empty. Enter the value as required.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p227063125413"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image4270537547" src="figure/en-us_image_0000001233800767.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p4702088418">Click <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b133901255161812">OK</strong>. The parameter values will be cached. Next time during the query execution/debug same parameter values will be displayed.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_note2961101318445"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p0962913184413">Once the specific connection is removed, all the parameter values in cache are cleared.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section174815261104"><h4 class="sectiontitle">Displaying Variable in Monitor Window</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p188886451109">Data Studio displays the variables which are being monitored in the Monitor Window while debugging.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p9668195217151">In the Monitor Window, variables must be added in following ways:</p>
|
|
<ul id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ul17547524162212"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li754711245225">Add selected variables from the <strong id="EN-US_TOPIC_0000001188202610__b4790121616386">Variable</strong> window and right-click the variable.</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li913733792310">Select variables from the <strong id="EN-US_TOPIC_0000001188202610__b19984164314387">Variable</strong> window and add variables by clicking the button in the <strong id="EN-US_TOPIC_0000001188202610__b15301312193916">Variable</strong> window toolbar.<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p173452101616"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image1434515101612" src="figure/en-us_image_0000001188521178.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p1239221761518"></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p158021519113610">If the value is changed in the variable window, the same would reflect in the monitor window if the variable is monitored and vice versa.</p>
|
|
</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li10942811325">During function/procedure debugging, right-click the variable to be added in the editor and add the variable to the <strong id="EN-US_TOPIC_0000001188202610__b14317164965320">Monitor</strong> window.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p188283367316"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image158281636732" src="figure/en-us_image_0000001188202666.png"></span></p>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p198891184811">The <strong id="EN-US_TOPIC_0000001188202610__b987671525419">Monitor</strong> window can be dragged to anywhere in the <strong id="EN-US_TOPIC_0000001188202610__b17839121205410">Data Studio</strong> window.</p>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section1508135815141"><h4 class="sectiontitle">Displaying Cursor Information for Variables During Debugging</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p1696212507356">In Data Studio, variable information is displayed if the cursor is hovered over that variable during the debugging of PL/SQL functions.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p1138875814163"><span><img id="EN-US_TOPIC_0000001188202610__image20662556123" src="figure/en-us_image_0000001436831937.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__p0488121053118"></p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_section2076445014318"><h4 class="sectiontitle">Supporting Rollback/Commit During Debugging</h4><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p1179852915210">Data Studio provides the option to commit/rollback the PL/SQL query execution result after debugging is finished.</p>
|
|
<ul id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ul1233413813014"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li1533408605">If <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b1433805435611">Debug With Rollback</strong> option is enabled, the PL/SQL execution result after debugging is not saved to the database.</li><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li1527716101208">If <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b182417101508">Debug With Rollback</strong> option is disabled, the PL/SQL execution result after debugging is submitted to the database.</li></ul>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p23319567163">Perform the following steps to enable the rollback function:</p>
|
|
<ol id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_ol1513645681710"><li id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_li773792812384"><span>Check the <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b16739122873813">Debug With Rollback</strong> box to enable the rollback function during PL/SQL debugging.</span><p><p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p970325353817">Or</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p99394369456">Right-click the <strong id="EN-US_TOPIC_0000001188202610__b166311774616">SQL Terminal</strong> window where the PL/SQL function is executed.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p106891544122117"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image1968911443215" src="figure/en-us_image_0000001233800769.png"></span></p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p1879020582462">Select <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b18187111434815">Debug With Rollback</strong> to enable the rollback function after the debugging is complete.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p1755682215489">Or</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p41471026174816">Right-click any PL/SQL function under <strong id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_b17271940124910">Functions/Procedure </strong>in <strong id="EN-US_TOPIC_0000001188202610__b3944123110919">Object Browser</strong>.</p>
|
|
<p id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_p9856183303220"><span><img id="EN-US_TOPIC_0000001188202610__en-us_topic_0185264940_image16856143393214" src="figure/en-us_image_0000001188681092.png"></span></p>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="DWS_DS_62.html">Debugging a PL/SQL Function</a></div>
|
|
</div>
|
|
</div>
|
|
|