COBOL CodeFlow is a VS Code extension designed to visualize the control flow of Visual COBOL programs. It generates a graph representation of the program’s control flow and provides a call hierarchy view, making it easier to understand and analyze complex code structures.
⚠️ Note: This extension was developed and tested using Visual COBOL v5. Support for other COBOL versions or dialects has not been verified and may not work as expected.
Getting Started
Control Flow View
Open a Visual COBOL File in VS Code.
To launch the Control Flow View, right-click inside the COBOL file and select "Show Control Flow View" from the context menu.
The control flow graph will appear. Click on any node in the graph to scroll to the corresponding section of the COBOL code.
Note: The control flow graph currently does not visualize if conditions logic.
Call Hierarchy View
Open the Explorer View in VS Code.
Open your COBOL file and place your cursor on the paragraph name you want to inspect.
Right-click and select "Show Call Hierarchy". The Call Hierarchy View will appear in the sidebar.
You can expand nodes to view all the callers of the selected paragraph.
Clicking on a caller will scroll to the corresponding line in the COBOL source file where it is performed.
Built With
antlr4ts — TypeScript parser generator for Visual COBOL grammar. The grammar file is adopted from Cobol85.g4 written for ANTLR v4.