DVT IDE for VS Code Tasks - How to Run External Tools
Description
Design and verification work often involves running various tools for processing, compiling or simulating the code. This video presents how you can easily integrate and run any 3rd party tool from within the DVT IDE for VS Code.
This video was shot using DVT 23.2.24 and VS Code 1.81.1.
Transcript
Introduction
Design and verification work often involves running various tools for preprocessing, compiling, or simulating the code. In order to save time and avoid switching through applications, these tools can be integrated in the DVT IDE for VS Code using the Tasks feature.
Creating a Task Configuration
To run an external tool, for example, a simulator, open the command palette, run the 'Tasks: Configure Task' command, select 'Create tasks.json file from template' and choose Others. This will create a tasks.json file under the .vscode directory, which can then be shared across the team.
Configuring the Task
Here you can configure:
- The user interface label
- The task type, which defines whether it is executed as a command inside a shell or as an independent process
- The actual command to be executed
- Its command-line arguments
- Additional options such as environment variables or the current working directory for the executed program
You can use predefined variables such as the current workspace folder or the user's home directory.
Running the Task
To run a task, use the 'Tasks: Run Task' command, select it from the list, and choose to continue without scanning the task output. The output is shown in the integrated terminal with hyperlinked file paths.
Assigning a Keyboard Shortcut to the Task
If you need to run a task frequently, you can map it to a keyboard shortcut. Run the 'Preferences: Open Keyboard Shortcuts (JSON)' command and assign your desired key binding to the workbench.action.tasks.runTask
command, specifying the task's label as an argument.