Generating code coverage in a remote debug session
With Concurrent Debug and Code Coverage, you can run code coverage collection in parallel with the active debug session. When this feature is enabled, code coverage data is collected during the debug run, and code coverage annotations are displayed and updated in the debug editor. You can turn code coverage collection on or off at any time during your debug session. The final code coverage result only includes coverage information for the source regions where code coverage collection is turned on.
About this task
- 64-bit applications are not supported.
- ZUnit is not supported.
- Concurrent Debug and Code Coverage requires z/OS Debugger 15.0.1 or later, with PTF UI74257 applied.
- After code coverage collection is started, you cannot switch the debug view. You can
collect code coverage in only one view in one debug session. If the debugged program includes both
compile units with compiler option
TEST(SOURCE)
and compiler units with compiler optionTEST(NOSOURCE)
, code coverage is not collected for compile units withTEST(NOSOURCE)
in the Listing view. In the Source view, code coverage is collected for both compile units withTEST(SOURCE)
and compiler units withTEST(NOSOURCE)
. You can switch to the Source view before starting the code coverage session. The Source view is available only when you debug programs compiled with Enterprise COBOL for z/OS Version 6 Release 3 and later with z/OS Debugger 16.0.0 or later. For more information, see Working with different debug viewsSwitching between different debug views.
- Enterprise COBOL for z/OS, Version 4, Version 5, and Version 6
- Enterprise PL/I for z/OS Version 4 and Version 5
- C/C++ feature of z/OS Version 1 and Version 2
- IBM High Level Assembler (HLASM), Version 1 Release 4, Version 1 Release 5, and Version 1 Release 6
Procedure
By default, Concurrent Debug and Code Coverage is disabled. You can enable it at the beginning or in the middle of a debug session.