16.10.2015 Views

Getting Started with IBM Data Studio for DB2

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

258 <strong>Getting</strong> <strong>Started</strong> <strong>with</strong> <strong>IBM</strong> <strong>Data</strong> <strong>Studio</strong> <strong>for</strong> <strong>DB2</strong><br />

5. A debug editor similar to the routine editor shows up <strong>with</strong> the debugger positioned on<br />

the first line of the stored procedure, which is theCREATE PROCEDURE statement. The<br />

current line where the debugger is positioned is always highlighted and a small arrow<br />

will be shown on the left margin. This is shown in Figure 8.24.<br />

Figure 8.24 – Debugger positioned on the first line of the stored procedure<br />

6. Set break points: In the Debug perspective there is a Debug task bar, as shown in<br />

Figure 8.25.<br />

Figure 8.25 – Debug task bar<br />

The arrow icons on the Debug task bar provide the Step Into, Step Over, Step Out and<br />

other features while debugging a program (in this case, a stored procedure):<br />

• The Step Into arrow ( ) positions you inside the next routine call at the<br />

currently executing line of code.<br />

• The Step Over arrow ( ) positions you after the next routine call (<strong>with</strong>out<br />

entering it) at the currently executing line of code.<br />

• The Step Return arrow ( ) positions you outside a routine which has been<br />

stepped into.<br />

• The Resume icon ( ) lets a suspended debug target continue running.<br />

• The Suspend icon ( ) halts the currently selected thread and temporarily<br />

stops it from running in a debug target. Once the selected thread is suspended<br />

you can then examine its stack frames.<br />

• The Terminate icon ( ) terminates the debug session<br />

While in the Debug perspective, in the debug editor <strong>for</strong> STOREDPROCEDURE1,<br />

double-click on the left vertical margin on theIF,ELSEIF,ELSE, andEND IF

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!