Configuration Guide
Learn how to configure the z/TPF VS Code Debugger Extension.
Table of Contents
- Configuration Guide
Debug Configuration
Launch Configuration
Create a .vscode/launch.json file in your project:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug z/TPF",
"type": "ztpf",
"request": "launch",
"program": "${file}",
"stopOnEntry": false
}
]
}
Configuration Options
| Setting | Type | Default | Description |
|---|---|---|---|
name | string | - | Display name for the configuration |
type | string | "ztpf" | Debugger type (must be “ztpf”) |
request | string | "launch" | Request type (launch or attach) |
program | string | - | Path to the program to debug |
stopOnEntry | boolean | false | Pause at program entry point |
args | array | [] | Command line arguments |
cwd | string | "${workspaceFolder}" | Working directory |
Connection Settings
System Connection
Configure your z/TPF system connection in settings:
- Open Settings:
Ctrl+,(Windows/Linux) orCmd+,(macOS) - Search for “z/TPF”
- Configure connection details
Or edit settings.json:
{
"ztpf.debug.host": "your-ztpf-host.example.com",
"ztpf.debug.port": 8001,
"ztpf.debug.timeout": 30000
}
Authentication
Configure authentication:
{
"ztpf.debug.username": "your-username",
"ztpf.debug.authMethod": "password"
}
Security Note: Credentials are stored securely in VS Code’s credential store.
Breakpoint Settings
Breakpoint Configuration
Configure breakpoint behavior:
{
"ztpf.debug.breakpoints.validateOnStart": true,
"ztpf.debug.breakpoints.allowConditional": true
}
Conditional Breakpoints
Set conditions for breakpoints:
- Right-click on a breakpoint
- Select “Edit Breakpoint”
- Enter a condition expression
Example conditions:
counter > 100status == "error"index % 10 == 0
Debug Output Settings
Output Configuration
Configure debug output:
{
"ztpf.debug.showConsole": true,
"ztpf.debug.showVariables": true,
"ztpf.debug.showCallStack": true,
"ztpf.debug.verbosity": "normal"
}
Verbosity Levels:
minimal- Essential information onlynormal- Standard debug outputverbose- Detailed debug information
Example Configurations
Basic Configuration
Minimal setup for debugging:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug z/TPF",
"type": "ztpf",
"request": "launch",
"program": "${file}"
}
]
}
Advanced Configuration
Configuration with additional options:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug z/TPF (Advanced)",
"type": "ztpf",
"request": "launch",
"program": "${file}",
"stopOnEntry": true,
"args": ["--verbose"],
"cwd": "${workspaceFolder}",
"env": {
"DEBUG": "true"
}
}
]
}
Multiple Configurations
Define multiple debug configurations:
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Current File",
"type": "ztpf",
"request": "launch",
"program": "${file}"
},
{
"name": "Debug Main Program",
"type": "ztpf",
"request": "launch",
"program": "${workspaceFolder}/src/main.asm"
},
{
"name": "Debug with Stop on Entry",
"type": "ztpf",
"request": "launch",
"program": "${file}",
"stopOnEntry": true
}
]
}
Workspace Settings
Project-Specific Settings
Configure settings for your workspace in .vscode/settings.json:
{
"ztpf.debug.host": "ztpf-dev.example.com",
"ztpf.debug.port": 8001,
"ztpf.debug.showConsole": true,
"ztpf.debug.verbosity": "normal"
}
Troubleshooting
Connection Issues
If you can’t connect to the debugger:
- Verify host and port settings
- Check network connectivity
- Confirm firewall settings
- Validate credentials
Configuration Validation
Validate your configuration:
- Open Command Palette (
Ctrl+Shift+P) - Run “z/TPF Debug: Validate Configuration”
- Review any errors or warnings
Next Steps
- Review Getting Started for debugging basics
- Explore Features for debugging capabilities
- Report issues on GitHub