IBM Z Open Debug is a Visual Studio Code extension that brings COBOL and PL/I applications debugging support to
VS Code. It provides developers a modern debugging experience for IBM Z Enterprise Languages. So, you want to try debugging Z applications inside VS Code? Let's get started.
Prerequisites
- Install and configure VS Code, see documentation for more details
- Access to z/OS with valid credentials
- Access to a running IBM z/OS Debugger 14.2.3 Remote Debug Service instance
Installation
- Open the Extensions view inside VS Code
- Click on ' … ' icon and select ' Install from VSIX... ' from the list
- Install previous downloaded VS Code Extension
Configuration
- Click the icon inside activity group
- Click ' create a launch.json file ' to add new configurations
- Select ' IBM Z Open Debug ' from the options VS Code prompts
- Predefined debug configurations will be added
By default, IBM Z Open Debug reuses the connection settings inside VS Code Settings, please refer
Setting up for IBM Z Open Debug and
IBM Z Open Debug Profile for more details.
After installation and configuration, you can check all active sessions by running with debug configuration: List parked IBM Z Open Debug sessions. You should be able to find all parked Z Open Debug sessions in DEBUG CONSOLE. It will list some general information, including Session ID, State, User, Program and UUID.
In the example below, it reuses connection details from VS Code settings. Alternatively, it also supports other attributes for overriding connection details inside configuration file.
Moving on, after launching your application in debug mode and parking it with Remote Debug Service, you can start debugging it in VS Code by running with debug configuration: Connect to parked IBM Z Open Debug session. It should bring you to an active debug session inside VS code, where you could find source code inside the editor, see variables, call stack and watch expressions as you step. Similar to other debugging tools, you can step through a running program, check variable values, and locate the bug bothering you.
Have fun with IBM Z Open Debug and stay tuned for future updates!