This is an open source project from Tektronix. We welcome
any feedback on the GitHub repo for this project.
Tektronix TSP™ Toolkit is a comprehensive Visual Studio Code extension that provides rich
support for Test Script Processor (TSP) technology to enhance productivity when working with
TSP-enabled Tektronix and Keithley instruments. This toolkit delivers a complete development environment with:
- Instrument Discovery & Management - Discover and manage available instruments on your local network with an intuitive tree view.
- Intelligent Code Editing - Syntax highlighting, error detection, code navigation, and completion suggestions for TSP scripts.
- Hover Help - Access detailed information on individual commands such as definition,
accepted parameters, and usage examples.
- Command Interface - Send commands and interact directly with your instruments
through the integrated terminal.
- Instrument Firmware Upgrade - Remotely upgrade the instrument firmware directly from the VS Code interface.
- Script Debugging - On-instrument debugging with breakpoints, step execution, and variable inspection.
- [Beta] Automated Script Generation - Configuration-driven interface to create TSP scripts without manual coding.
- System Configuration Management - Support for TSP-Link™ networks and multi-instrument setups.
Quick Start
Step 1. Connect your TSP-enabled Tektronix or Keithley instrument to your local network (LAN) or directly to your computer via USB.
Step 2. Install the Tektronix TSP Toolkit Visual Studio Code Extension.
Step 3. Open or create a folder for your TSP project.

Step 4. Access the TSP Toolkit by clicking on the TSP icon in the Activity Bar.
Step 5. Connect to your instrument using one of these methods:
- Use the Instrument Explorer to discover instruments on your network and connect by clicking the play button (▶️)
- Click the "+" button in the Instrument Explorer to connect via IP address or VISA resource string
- Use the Command Palette (Ctrl+Shift+P) and run "TSP: Connect"
Step 6. Configure your project for your TSP-Link™ instrument configuration.
Step 7. Edit and run your TSP scripts by right-clicking them in the file explorer,
file tabs, or editor window and selecting "Send Script to Terminal"

Demo Video

TSP View Container
TSP Toolkit provides a dedicated view container in the Activity Bar that offers access to all major features:
View Sections
Instruments: Displays discovered and saved instruments on your network.
- Connect to instruments.
- Manage instrument connections.
- Perform instrument operations (reset, abort, firmware upgrade).
System Configurations: Configure your TSP-Link instrument network.
- Create new system configurations.
- Fetch configurations from connected instruments.
- Switch between different configurations.
[Beta] Script Generation: Create and manage TSP scripts without manual coding.
- Create new script generation sessions.
- Access saved script configurations.
- Generate ready-to-use TSP scripts.
Accessing the View
Click the TSP Toolkit icon
in the Activity Bar (usually on the left side of VS Code) to access all these features.
Working with Instruments
Instrument Explorer
The Instrument Explorer provides an intuitive interface for discovering, connecting to, and managing your TSP-enabled instruments.
Key Features
- Auto-Discovery: Automatically find TSP instruments on your local network.
- Manual Connection: Connect to instruments via IP address or VISA resource string.
- Instrument Management: Save, rename, and remove instruments from your list.
- Firmware Upgrade: Upgrade instrument firmware directly from the explorer interface.
- Terminal Integration: Open terminal connections to instruments with a single click.
- Reset & Abort: Control instrument state with reset and abort functions.
Terminal Usage
When connected to an instrument, you interact with it through the integrated terminal:
- Direct Command Execution: Type TSP commands directly in the terminal and press Enter to execute them.
- Terminal Commands: The terminal supports special commands prefixed with a period (
.
). Here are the most important ones:
.help
- Display available terminal commands.
.exit
- Properly close the terminal connection (recommended over using the trash icon).
.reset
- Reset the connected instrument.
.abort
- Abort the current operation on the instrument.
Usage Notes
When running scripts or commands via the terminal, errors are only fetched after the
requested action completes. No new errors will be printed while the operation is in
progress.
Working with TSP Scripts
Running Scripts
To execute your TSP scripts on connected instruments, you can perform one of the following:
- Right-click a TSP file in the explorer or editor and select "Send Script to Terminal"
- Click the Run icon in the editor title bar when a TSP file is open
[Beta] Automated TSP Script Generation
The Automated TSP Script Generation is a powerful feature that allows you to create TSP scripts through a graphical interface without needing to write code manually.
⚠️Warning
The Automated TSP Script Generation feature is currently in beta. If you encounter issues, please let us know so we can improve it.
ℹ️Note:
System configuration must be completed before using the Automated TSP Script Generation feature, as channel IDs are populated based on your configured system.
Using the Automated TSP Script Generation
- First, configure your project for your instrument system.
- Open the TSP Toolkit view container from the Activity Bar.
- Locate the SCRIPT GENERATION section.
- Click the "+" button and enter a name for your script.
- Configure your test parameters in the webview interface.
- Click Open Script to generate and view your TSP script.
- The generated script will appear in a side pane for further editing or execution.
Managing Script Generation Sessions
- Save Sessions: Your script generation configurations are automatically saved and can be accessed again later.
- Delete Sessions: Click the delete icon next to a saved session to remove it from your list.
- Edit Sessions: Click on a saved session to reopen and modify it.
TSP Script Debugging
The TSP Toolkit includes a powerful on-instrument debugging capability that allows you to debug your TSP scripts directly on the connected instrument.
Using the TSP Debugger
- Open a TSP script file in the editor.
- Set breakpoints by clicking in the gutter next to line numbers.
- Start debugging by:
- Using the Run and Debug view (Ctrl+Shift+D)
- Using the Command Palette and running "TSP: Debug TSP File".
- Click the debug icon in the editor title bar.
- Use the debug controls to step through your code, inspect variables, and view the call stack.
Debug Features
- Breakpoints: Set breakpoints in your TSP code to pause execution at specific points.
- Variable Inspection: View and monitor variable values during script execution.
- Watch Expressions: Add custom expressions to the watch panel to track specific variable values or evaluate expressions as your script runs.
- Call Stack: Navigate the execution call stack to understand the flow of your code.
- Step Controls: Step into, step over, and step out of functions during debugging.
System Configuration
There are two ways to configure your project to have language features for your TSP-Link
node network: Automatic or Manual.
After completing either method, you will be shown relevant code completion suggestions,
signature help, and documentation for the instruments in your TSP-Link network.
Automatic Configuration
If you are already connected to a physical instrument with your TSP-Link network configured,
then it is possible to have TSP Toolkit automatically configure your project for you.
- Open any workspace folder in VSCode.
- Connect to your instrument using the discovery pane or the
TSP: Connect
command.
- Open the side bar by clicking the TSP Toolkit icon in the Activity Bar (usually on the left side of VSCode).
- In the TSP Toolkit side pane, expand the SYSTEM CONFIGURATIONS section.
- Click the Fetch connected instrument and its TSP-Link nodes icon.
- Enter a name for the new system when prompted.
Manual Configuration
- Open any workspace folder in VSCode.
- Open the side bar by clicking the TSP Toolkit icon in the Activity Bar (usually on the left side of VSCode).
- In the TSP Toolkit side pane, expand the SYSTEM CONFIGURATIONS section.
- Click the Add new System icon.
- Enter the required system details and save.
Command Reference
Common Commands
Open the Command Palette (Cmd+Shift+P on macOS and
Ctrl+Shift+P on Windows or Linux), then type one of the
following commands:
Command |
Description |
TSP: Connect |
Opens a new terminal session to an instrument (be sure to close with .exit , see the Known Issues section below) |
TSP: Debug TSP File |
Start debugging the current TSP file on the connected instrument |
TSP Toolkit: Focus on Script Generation View |
Open the Automated TSP Script Generation interface |
To see all available Tektronix TSP Toolkit commands, open the Command Palette and type TSP
.
Right-click on your active editor window while a *.tsp
file is open to access:
Context-Sensitive Option |
Description |
Send Script to Terminal |
Send the current script to the currently connected instrument |
Resources and Documentation
Installed Extensions
Tektronix TSP Toolkit will automatically install the sumneko.lua
extension to use all of the language features it provides.
Extensions installed through the marketplace are subject to the Marketplace Terms of Use.
Learning Resources
Supported Locales
The extension is currently only available in English.
Questions, Issues, Feature Requests, and Contributions
- If you come across a problem with the extension, please file an issue.
- Any and all feedback is appreciated and welcome!
- If someone has already filed an issue that encompasses your
feedback, please leave a 👍/👎 reaction on the issue. Otherwise please start a new
discussion
- If on Windows, you must have Microsoft Visual C++ Redistributable. Please ensure you have this installed.
Known Issues
We are constantly working to improve the stability and reliability of this software. Here
are the known issues that we are working to fix. If you come across new issues,
please let us know! See the next section
for more information.
- Due to limitations in instrument firmware, script names longer than 27 characters will
be truncated to 27 characters. If multiple scripts have names that are the same up to
the 27th character, the second script will overwrite the first.
- Some instruments (2450, 2460, 2461, 2470, DAQ6500, DMM7510, 3706A, 707B, 708B) encounter
a fatal error if the trash can is used to close the connected terminal if the instrument
is connected via GPIB on VISA. Be sure to type
.exit
when connected to one of these
instruments over GPIB.
- The list of instruments that support language features is limited to the following:
- 2450
- 2460
- 2461
- 2470
- 2601B
- 2601B-PULSE
- 2602B
- 2604B
- 2611B
- 2612B
- 2614B
- 2634B
- 2635B
- 2636B
- 2651A
- 2657A
- DMM7510
- MP5103
- Upgrading firmware on the 3706A, 707B, and 708B instruments is not successful. This will NOT
render the instrument inoperable, but will not complete successfully.
- Instrument discovery might not work for 2600-series and 3706A due to firmware limitation.
- Running the debugger with a breakpoint on a
trigger.detector[x].wait(y)
command will cause the MP5103 to crash
- Dumping the instrument queue with the "Dump queue on connect" setting enabled no longer works
- Debugger does not function when the instrument is password protected