340 likes | 681 Views
Colleague Studio Debugging. Moderated by: Susan Fenn Presented by: William Sanders. Overview. Compile code for debugging in Colleague Studio Set breakpoints in generated code Execute the debugger based on process type Step through code to view system state as it runs.
E N D
Colleague Studio Debugging Moderated by: Susan Fenn Presented by: William Sanders
Overview Compile code for debugging in Colleague Studio Set breakpoints in generated code Execute the debugger based on process type Step through code to view system state as it runs.
Compile for Debugging Minimum version for debugging is Colleague Studio 2.6 (2.8 current) User must have Read,Write, Execute access on the ext,lib, debugger directories within the <environment>/svr01 directory. (ans. #7610)
Compile for Debugging(notes) Debugging assumes that syntax is correct and code has at least been generated correctly once. The icon to compile for debugging is only visible from generated code. Anytime you GEN, you will need to recompile for debugging. Some large datatel delivered subroutines cannot be compiled for debugging (ans. #56882.44 )
Setting Breakpoints Breakpoints must be set in the generated code (or web generated code for web forms) Double click in margin of generated code to toggle breakpoints You can use the Outline view to help place breakpoints Helpful hint – select/copy from user code/forms and then paste/search in the generated code.
Setting Breakpoints Multiple processes can be compiled for debugging and breakpoints can be set for each. *unidata 7.2.3 limits breakpoints Breakpoints will only halt execution if they are actually hit. Must set a breakpoint on a line of code that is executable.
Running the Debugger “What” is being debugged? Subroutine, batch, UI form, Web form? Must set up a debug configuration that allows user to launch debug session.
Debug Configuration(UI form) Remove any <appl>.JUMPSTART paragraphs from LOGIN paragraph (or exclude based on user) Make sure url ends in sl/index.htm
Debug Configuration(WebAdvisor form) Launches an instance of Webadvisor from your local machine. It uses the default .war file that does not reflect customizations of the environment that is being debugged.
Running the Debugger Debug Perspective – Screen 1
Running the Debugger Debug Perspective – Screen 2
Stepping through the Code When working with loops, step off the breakpoint before resuming debugging. Otherwise, it will not break on the next iteration of the loop. View/Edit variable state at each breakpoint.
Viewing Variables(notes) Displaying Large numbers of variables will impact the performance of debugging. Restrict viewing to only those variables you care about Variables which contain large lists of items can cause the debugger to crash. Be careful, when selecting these variables. (Use GRDS debugging)
Viewing Debug Statements Normal debug statements (datatel.debug, SHOWA, etc) will output to the console window
Final Notes Unable to debug $INSERTS Use UTRR to help duplicate execution scenarios when debugging. You can also hover over variables in the code to view their values.