Files
nx_post_support/README.md
T
Christoph Brandau 33cf282b0a feat(debug): enable Python debug workflow and debug server integration
Adds an end-to-end Python debug workflow for the extension.
Includes a new prepare-debug.ps1 script and a VS Code task.
Extends the Python server and extension to coordinate a debug session and safe startup.

- Add prepare-debug.ps1 and a VS Code task to build the debug bundle
- Enable Python debug wiring in the server and tests
- Ensure a single stable Python debug session during startup
2026-08-17 11:02:22 +02:00

2.7 KiB

NX Postprocessor Support

A comprehensive VS Code extension providing language support for NX CAM postprocessor development, including CDL, TCL, and DEF files.

Features

  • Syntax Highlighting - Full syntax highlighting for CDL, TCL, and DEF files
  • Code Formatting - Automatic code formatting for all supported file types
  • Multi-language Support - Supports NX CDL, TCL, and DEF file formats
  • Intelligent Code Analysis - Linting and error detection for postprocessor code
  • Auto-completion - Context-aware code completion for faster development
  • Signature Help - Shows parameters and documentation for custom and NX procedures

Supported File Types

  • .cdl - NX User Defined Event File
  • .tcl - NX TCL postprocessor files
  • .def - NX Definition files

Installation

  1. Install from the VS Code Marketplace
  2. Install Python 3.11 or higher
  3. Open any .cdl, .tcl, or .def file
  4. The extension will automatically activate and provide language support

Configuration

The extension can be configured through VS Code settings:

  • nx-post-support.interpreter - Specify custom Python interpreter path for the language server
  • nx-post-support.formatter - Enable/disable the TCL formatter (default: false)
  • nx-post-support.inlayHint - Enable/disable inlay Hints (default: true)

Usage

Simply open any supported file type and enjoy:

  • Syntax highlighting
  • Error detection and linting
  • Code completion
  • Code formatting (Format Document command)
  • Hover information
  • Signature help while entering procedure arguments

Development and debugging

Install the root and client dependencies before the first debug session:

npm install
npm install --prefix client

Use one of the checked-in VS Code launch configurations:

  • Run Extension debugs the TypeScript extension host.
  • Debug Extension and Python debugs both the TypeScript extension and the Python language server. This is the recommended configuration for LSP work.
  • Python Attach attaches manually to an already running Python process.

The launch configuration creates a fresh non-minified bundle with embedded source maps and opens test/test.tcl so the extension activates immediately. For combined debugging, the Python adapter listens on 127.0.0.1:5678; the language server waits for that adapter before initialization. The NX Postprocessor Support output channel reports Python debug mode: enabled and shows _debug_server.py in the server command when the debug path is active.

Contributing

This extension is actively maintained. For issues or feature requests, please visit our repository.

License

AGPL-3.0 License - see LICENSE file for details.