TASKING winIDEA Debug Extension for Visual Studio Code
Extension for debugging using winIDEA workspaces in Visual Studio
Code.
More information on our website.
TASKING Hex Editor extension is needed for viewing debug memory and will be installed automatically.
Quick Setup
For initial setup, follow the Get Started with TASKING winIDEA walkthrough. If it doesn't open automatically on extension install, you can open it from the Welcome page, or from the command palette (Ctrl + Shift + p -> Welcome: Open Walkthrough -> Get Started with TASKING winIDEA)
The Walkthrough will guide you through the steps to install the necessary components, open an example workspace, and start debugging as quickly as possible.
Installing winIDEA
For this extension to work, an installation of winIDEA is needed. To install the latest version of winIDEA automatically:
- Click
Run and Debug
tab
- Click on the
winIDEA Configuration
title to open the dropdown menu
- Click on the three dots and select
Download latest version of winIDEA
The command can also be called from the command palette.
You will also be prompted to install the latest version whenever an update is available, or when you attempt to open a workspace when no version is installed.
Using a custom winIDEA version
If you prefer to use a version of winIDEA that you already have installed, you can also setup the extension to use it:
- Click
Run and Debug
tab
- Click on the
winIDEA Configuration
title to open the dropdown menu
- Click on the three dots and select
Select custom path to winIDEA install
- Use the dialog to navigate to winIDEA install directory, and select winIDEA.exe
The command can also be called from the command palette.
Opening a Workspace
Creating a New Workspace
- Open the
winIDEA Configuration
view
- If open, close the current winIDEA workspace
- If you want to create a blank workspace:
- Click on the
New Workspace
button
- Follow the New Workspace configuration wizard
- A blank workspace configured for your hardware will be opened
- If you want to start from an winIDEA Example Workspace:
- Click on the
Open Example Workspace
button
- Choose an example for your target
- The example will be cloned and opened
Opening an existing winIDEA workspace
- Open the
winIDEA Configuration
view
- If open, close the current winIDEA workspace
- Press the
Select Workspace
button
- Select your winIDEA workspace
.xjrf
file
- A VS Code workspace configured for your winIDEA workspace will be automatically generated and opened
Alternatively, you can also open .xjrf
files in VSCode directly, and you will be given the option to convert them to a VSCode workspace.
Start debugging
To select a launch configuration, open the Run and Debug
tab, and use the dropdown on the top left. By default, two launch configurations will be available:
winIDEA Download: This configuration will download the configured program file to target, reset it and start debugging.
winIDEA Reset: This configuration will only reset the target, load symbol files and start debugging without downloading the program files.
You can add additional launch configurations to the .code-workspace
file. Other parameters you can change are:
stopOnEntryAt:
On start debug, run program until this function.
verifyDownload:
After download, verify program.
loadSymbolsOnly:
Set to true to reset target without downloading
Building Examples
Examples with VS Code CMake
are buildable with the CMake Tools
extension. CMake and Ninja will be automatically installed and setup, you only need to set the path to the compiler folder.
Linux
- To use winIDEA installed through snap, set Custom install to true, and path to winIDEA to
global
.
- First start of winIDEA may time out due to wine setup taking a long time, opening workspace again should fix it.
Debug functionality
winIDEA Configuration view
This view contains all toggles and configuration windows available from winIDEA organized in a tree view. Press the save button to save and the X
button to save and close the workspace, if you want to open a different one.
The dropdown in the title bar lists some useful commands, such as opening logs, opening extension settings, opening symbol browser etc.
If no workspace is opened, this view will contain buttons to open or create a workspace. Use:
Open Workspace
to open the currently configured workspace file,
Select Workspace
to select and open an existing .xjrf
workspace file,
New Workspace
to create a new workspace, or
Open Example Workspace
to create a workspace from one of the winIDEA Example Workspaces.
Extension settings
To open settings for the winIDEA extension, open the dropdown menu in the winIDEA Configuration
view and select Open extension settings
. This will list all global settings under the User
tab and settings for the current workspace under Workspace
Some notable settings:
- Command Line Options: Pass these options to winIDEA when starting connection.
- Refresh SFR on Step: Automatically refresh the SFR view whenever the data may have changed. This may have a negative impact on performance.
- Show Window: show winIDEA GUI alongside vscode.
Other options will be set automatically using other commands.
Viewing log files
- Log output for the extension can be viewed through the output view (View -> open view -> output), select winIDEA debug.
- Unhandled exceptions will be reported to the output view, Extension host
- Log output from winIDEA can be opened through Command Palette: Open winIDEA log
- Log output from debug adapter can be opened through Command Palette: Open debug adapter log
SFRs view
This view contains a list of all available SFRs.
NOTE: by default, the SFR view does not update every step! Make sure to refresh it to ensure you get the latest values, or move the SFRs you want to monitor to the watch view. You can also enable automatic refresh in settings, but it may have a negative impact on performance.
- To refresh all values, press the refresh icon in view top right corner.
- Clicking on a group should expand it, loading all the children and their values.
- To edit a SFR, press the edit icon next to it. You can also use F2 to edit the last selected value.
Right click -> add to watch
will add the selected SFR to the watch view for easier monitoring.
Session Explorer view
Lists all configured SMPs, their cores and their statuses. Press on a core to switch debug focus to it.
Real-Time Watch view
Variables in the Real-time Watch view will update once per second. To add a variable, press the + button on the view, or right click on a variable in variables/code and select Add To Real-Time Watch.
Debug Memory view
Debug Memory view is implemented in the TASKING Hex Editor extension, which should be installed automatically. To open it, use the Open Debug Memory command, or use the View Binary Data button next to variables in any of the views.
- To go to a specific memory location, use the Go To Offset button in the memory views title bar, and enter the wanted offset.
- To go to a specific variable in memory, use the
View binary data
button next to variables, or use the Go To Variable button in the memory views title bar, and enter the wanted variable. The dropdown will list variables that are visible in the Variables
view, so make sure to expand globals before using.
You can also use the view to edit debug memory: write your changes to the memory view, then save to write your changes to target.
Variables and Core Registers view
Global variables, local variables and registers are listed in the Variables view, which allows for monitoring, editing, adding to watch view and viewing in debug memory.
Sources
View all loaded source files in the Loaded Scripts view
Symbols
Use the Command Palette (Ctrl+Shift+P) and launch the TASKING winIDEA: Browse Symbols command to view all loaded symbols. The command can also be run from the winIDEA Configuration
views drop down menu.
Hardware Breakpoints
Use the Command Palette (Ctrl+Shift+P) and launch the TASKING winIDEA: Setup Hardware Breakpoints command. This command is only available when debugging. The command can also be run from the winIDEA Configuration
views drop down menu.
Data/Telemetry
This extension collects usage data and sends it to Microsoft to help us improve products and services. Collection of telemetry is controlled via the same setting provided by Visual Studio Code: "telemetry.enableTelemetry". Read the privacy statement to learn more.