Troubleshooting using log files
You can configure logging for IBM Z Open Editor to produce detailed logs that help troubleshoot problems by providing more information and traces of the editor’s activities. Enable logging through a user preference setting called zopeneditor.logger. In the VS Code Preferences editor, you can select from the available log levels: DEBUG, INFO (default), WARN, ERROR, and OFF.
Some log files are created by VS Code and require a separate setting to enable them. For example, VS Code can generate a trace of all language server client-to-server interactions, as documented in the VS Code Language Server Extension Guide. To enable this log, specify the user setting "<languageId>.trace.server": "verbose", such as"cobol.trace.server": "verbose". This log can help support teams analyze specific issues related to program processing during editing.
Zowe Explorer also has its own logging mechanism, which you can configure to troubleshoot issues accessing z/OS resources. See the Zowe documentation Troubleshooting Zowe Explorer for details.
After logging is enabled, the output of most logs can be found in two locations:
- In the VS Code Output panel, by selecting the name of the log file such as "IBM Z Open Editor", "IBM User Build", "IBM Z Open Editor MCP", "Zowe Explorer" and others from the drop-down list.
- A log file written to your disk, which can be shared with technical support (if entitled) or attached to an issue filed against the public issues repository on GitHub. The first line in the VS Code Output panel shows the absolute path to the file on your system.
Additional details for each log are provided in the table below.
Export all relevant log files for technical support
You can use the Z Open Editor command "Export Support Files" to retrieve all relevant log files relevant to Z Open Editor operations into a convenient ZIP file that can be shared with IBM Technical Support.
- In the Command Palette, select
> Z Open Editor: Export Support Files. - A pop-up dialog prompts you to choose the directory where the ZIP file should be saved.
- After a successful export, a notification confirms the path to the exported ZIP file.
Review the log files
Use the log files contained in the exported ZIP file to troubleshoot issues using the information provided.
For example, when investigating why a specific include file was not found by the editor, the log file named "zopeneditor-<timestamp>.log" generated at the DEBUG log level can provide a trace of the editor’s activities. This includes locating ZAPP files in your workspaces, identifying the property groups used, and listing the directories the editor searches. You can review the log to see where the initial request for a specific file was made, the steps taken to process the request, and any errors that were reported. Because requests for all include files in a program are processed in parallel, each request is assigned a unique request ID. This ID helps distinguish concurrent events in the log.
Locate log files manually
If you prefer to locate the log files yourself either those exported using the procedure above or those generated in real time, you can refer to the list of locations below. The table also includes the names used to identify each log in the VS Code Output view.
| Log type | VS Code Output View Name | Location |
|---|---|---|
| The main log for Z Open Editor activities | IBM Z Open Editor | The location is specified in the Output panel on the second line. ** The log file is available at...
|
| Language Server log | Not in Output | In the main log, find the line that begins with the following sentence to locate the LSP logs: ** ZLanguageServer: Will start a language server with command... Then find the -data, tag, which precedes the LSP log file location.
|
| Language Client log | <Language> Language Server | Available only after enabling the VS Code setting described in the preceding section. The log appears in a dynamically created folder such as in these examples:
|
| Zowe Explorer log | Zowe Explorer |
|
| RSE API plug-in for Zowe CLI (RSE CLI plug-in) logs | Not in Output | Log files are located in the locations:
|
| VS Code Extension Host log showing general editor events | Extension Host | Log files are located in:
|
| User Build output | IBM User Build | Log files are located in:
|
| Z Open Editor MCP events and traces | Z Open Editor MCP | Log files are located in:
|
| ZCodeScan events and traces | IBM ZCodeScan | Log files are located in:
|
Finding versions of all VS Code extensions installed
Enabling logging also provides information that technical support will be asking for. To retrieve it:
Ensure that your IBM Z Open Editor logger preference is set to
DEBUG.In the
Outputconsole window, selectIBM Z Open Editorfrom the drop-down list. The following information will be listed:- IBM Z Open Editor version
- Editor platform and version
- Editor Installation information
- Java SDK configuration location and memory allocation
- Key user settings
- Zowe Explorer VS Code Extension version
- Other VS Code Extensions visible
Finding Zowe CLI version and RSE CLI plug-in version
In the VS Code Terminal window, enter the applicable commands:
- Command for Zowe CLI:
zowe --version - Command for RSE CLI plug-in:
zowe plugins list
Log levels
IBM Z Open Editor uses the log levels described in the following chart. These levels are listed in order of most to least detailed (with the exception of OFF, which turns off all logging). For example, the DEBUG setting will output detailed debug information as well as messages from the other levels below it: INFO, WARN, and ERROR. In contrast, the ERROR setting will only log important errors.
| Log level | Description |
|---|---|
| Debug | Identifies detailed informational events that are useful for troubleshooting the editor's behavior. |
| Info | Provides informative messages that are of general interest to the end user for observing activities performed by the editor. |
| Warn | Indicates potentially problematic situations that could cause unexpected behaviors or errors. |
| Error | Designates error events that interrupted the editor in executing an operation as intended. |
| Off | Nothing is logged. |