Xilinx Native Debug is a Visual Studio Code debugger extension for embedded and native targets, with first-class support for Xilinx workflows.
It focuses on:
- XSDB-driven board bring-up and runtime access
- GDB-based software debugging
- Zynq-7000, Zynq UltraScale+, Versal, and MicroBlaze targets
- classic native GDB, LLDB, and Mago-MI workflows where needed
This extension is designed for developers debugging:
- Zynq-7000 processing systems
- Zynq UltraScale+ MPSoC applications
- Versal platforms
- MicroBlaze software on FPGA designs
- mixed FPGA + processor bring-up flows
- remote GDB targets for embedded systems
- integrated RAM hex editor
- integrated COM port monitor, raw TCP monitor, telnet monitor
The main Xilinx workflow is provided by the xsdb-gdb debugger type:
- XSDB handles board connection, target selection, bitstream download, hardware handoff loading, PS init, reset, memory/register access, and custom Tcl commands
- GDB handles symbols, breakpoints, stepping, stack, variables, and source-level debugging
xsdb-gdbdebug type for combined XSDB + GDB debugging- FPGA programming through XSDB
- hardware export loading via
.hdfor.xsa - PS init via
ps7_init.tclorpsu_init.tcl - target selection by filter or JTAG cable name
- runtime XSDB commands from the VS Code Debug Console using
xsdb: - XSDB memory read/write commands from the Command Palette
- board reset commands from the Command Palette
- optional XSDB command tracing
- grouped register scopes for Zynq cores
- peripheral register watch support
- linker map annotation for watched addresses
- optional FreeRTOS task awareness
- breakpoint revalidation after reset flows
- fail-fast path validation for Xilinx artifacts
- GDB launch and attach
- LLDB support
- Mago-MI support for Windows targets
- SSH-based remote debugging
- gdbserver-based remote debugging
- manual MI command entry using
-in the Debug Console
- Zynq-7000
- Zynq UltraScale+ MPSoC
- Versal
- FPGA-only bitstream/program flows
- MicroBlaze-based systems (not tested)
Typical Xilinx setup:
- Xilinx tools installed with
xsdborxsdb.bat - reachable
hw_server - bitstream file (
.bitor.pdi) if PL programming is required - hardware handoff (
.hdfor.xsa) if needed - PS init Tcl script (
ps7_init.tcl/psu_init.tcl) when required - GDB and a reachable GDB endpoint such as
extended-remote localhost:3000
For Windows, xsdb.bat is supported directly.
Use a launch configuration like this:
{
"type": "xsdb-gdb",
"request": "attach",
"name": "Debug Zynq-7000 Application",
"xsdbPath": "C:/Xilinx/SDK/2019.1/bin/xsdb.bat",
"hwServerUrl": "tcp:127.0.0.1:3121",
"initTargetFilter": "APU*",
"targetFilter": "ARM*#0",
"jtagCableName": "Digilent JTAG-SMT1 210203859289A",
"bitstreamPath": "./hw_platform/top_wrapper.bit",
"hwDesignPath": "./hw_platform/system.hdf",
"psInitScript": "./hw_platform/ps7_init.tcl",
"loadhwMemRanges": ["0x40000000 0xbfffffff"],
"forceMemAccess": true,
"stopBeforePsInit": true,
"resetType": "processor",
"boardFamily": "zynq7000",
"keepXsdbAlive": true,
"gdbpath": "C:/msys64/mingw64/bin/gdb-multiarch.exe",
"target": "extended-remote localhost:3000",
"executable": "./build/app.elf",
"cwd": "${workspaceRoot}",
"remote": true,
"stopAtConnect": true,
"autorun": [
"set print pretty on",
"set confirm off",
"file ./build/app.elf",
"load"
]
}Primary Xilinx flow.
Use this when you want:
- XSDB board init
- FPGA programming
- PS initialization
- GDB source-level debugging
Use for generic embedded/native GDB workflows that do not need XSDB orchestration.
Use for LLDB-based native debugging.
Use for Mago-MI workflows on supported Windows targets.
xsdbPathhwServerUrlinitTargetFiltertargetFilterjtagCableNamebitstreamPathltxPathhwDesignPathloadhwMemRangespsInitScriptinitScriptforceMemAccessstopBeforePsInitresetTypeboardFamilykeepXsdbAlivexsdbAutorunregisterPresetperipheralWatchbreakpointAutoReapplyfreertosAwarenessmapFilePathxsdbTraceCommands
Full Xilinx-focused details and recipes are in README_zynq.md.
In an active xsdb-gdb session, send XSDB commands directly from the Debug Console:
xsdb: targets
xsdb: mrd 0xF8000000 10
xsdb: rst -processor
xsdb: trace
MI commands for the backend debugger can still be sent with -.
- XSDB: Program FPGA Bitstream
- XSDB: Reset Board
- XSDB: Read Memory
- XSDB: Write Memory
- XSDB: Send Command
- XSDB: Quick Reset
- XSDB: Reset Processor
- XSDB: Reset System
- XSDB: Hex Memory Editor
- UART: Connect Serial Terminal
- UART: Disconnect Serial Terminal
- UART: Toggle Connect/Disconnect
- Telnet: Connect
- Telnet: Disconnect
- Telnet: Toggle Connect/Disconnect
- TCP: Connect (Raw)
- TCP: Disconnect (Raw)
- TCP: Toggle Connect/Disconnect (Raw)
- Xilinx Native Debug: Examine Memory Location
Status bar buttons are shown for quick terminal access:
- UART button: click to connect if disconnected, or disconnect if connected
- Telnet button: click to connect if disconnected, or disconnect if connected
- TCP button: click to connect if disconnected, or disconnect if connected
These buttons are always visible after extension activation and are intended for fast board-console workflows.
The extension includes a built-in UART serial terminal that integrates into the VS Code Terminal panel.
- Open the Command Palette and run UART: Connect Serial Terminal
- Select a COM port (auto-detected) or enter one manually
- Enter a baud rate (default: 115200)
- The terminal opens in the VS Code Terminal panel with full I/O
The extension spawns an external tool for serial communication to avoid native npm dependencies:
- Windows:
plink.exe(PuTTY CLI) or PowerShellSystem.IO.Ports.SerialPort - Linux/macOS:
picocom,minicom, orscreen(auto-detected in PATH order)
Configure the preferred tool via xilinx-debug.serial.externalTool in settings.
| Setting | Default | Description |
|---|---|---|
xilinx-debug.serial.defaultBaudRate |
115200 |
Default baud rate |
xilinx-debug.serial.defaultPort |
"" |
Default serial port |
xilinx-debug.serial.externalTool |
"auto" |
Tool to use: auto, plink, picocom, screen, minicom, powershell |
A built-in Telnet terminal using Node.js net.Socket with inline IAC negotiation handling.
- Open the Command Palette and run Telnet: Connect
- Enter host (default:
127.0.0.1) and port (default:23) - The session opens in the VS Code Terminal panel
| Setting | Default | Description |
|---|---|---|
xilinx-debug.telnet.defaultHost |
"127.0.0.1" |
Default Telnet host |
xilinx-debug.telnet.defaultPort |
23 |
Default Telnet port |
A built-in raw TCP terminal for plain TCP streams (no Telnet negotiation), ideal for lwIP TCP console servers.
- Open the Command Palette and run TCP: Connect (Raw)
- Enter host (default:
127.0.0.1) and port (default:5000) - The raw TCP session opens in the VS Code Terminal panel
| Setting | Default | Description |
|---|---|---|
xilinx-debug.tcp.defaultHost |
"127.0.0.1" |
Default raw TCP host |
xilinx-debug.tcp.defaultPort |
5000 |
Default raw TCP port |
A read/write hex memory editor webview for inspecting and modifying memory during debug sessions.
- Open the Command Palette and run XSDB: Hex Memory Editor
- Enter a start address (hex, e.g.
0xF8000000) and byte count - The hex editor webview opens with:
- Offset column, hex bytes (16 per row), and ASCII column
- Click any byte to edit it (modified bytes are highlighted)
- Write button to commit changes via XSDB
- Refresh button to re-read the range
- Go to address and byte count inputs for navigation
Requires an active xsdb-gdb debug session.
| Setting | Default | Description |
|---|---|---|
xilinx-debug.hexEditor.defaultByteCount |
256 |
Default number of bytes to read |
Quick reset buttons that appear during an active xsdb-gdb debug session:
- Status bar item: A
$(debug-restart) Reset Boardbutton appears in the status bar duringxsdb-gdbsessions - Debug toolbar: A reset button appears in the debug toolbar
- Command Palette:
XSDB: Quick Reset,XSDB: Reset Processor,XSDB: Reset System
The quick reset uses the configured xilinx-debug.xsdb.defaultResetType setting (default: processor) without prompting.
| Setting | Default | Description |
|---|---|---|
xilinx-debug.xsdb.defaultResetType |
"processor" |
Default reset type for quick reset: processor or system |
For attach sessions, avoid GDB load unless the remote target explicitly supports it.
A safe attach setup is usually:
set print pretty onset confirm offfile ./build/app.elf
Paths are validated before XSDB starts.
On Windows, relative paths are resolved against cwd.
Check:
cwdbitstreamPathhwDesignPathpsInitScriptinitScript
Use either:
target: "extended-remote localhost:3000"- or
target: "localhost:3000"
The extension now handles extended-remote correctly in remote attach flows.
Check:
- your GDB server is running on the expected port
- the target core selected by
targetFilteris correct - your ELF path is correct
- your attach
autorunonly loads symbols unless remote load is supported
README_zynq.md: Xilinx and XSDB guide, recipes, and advanced configurationHACKING.md: development notes for working on the extension itselfCHANGELOG.md: project history
npm run vscode:prepublishnpx vsce package
This project is based on the original work by WebFreak.
Original upstream/project base:
- WebFreak / WebFreak001
- Repository: WebFreak001/code-debug
This fork/customized version extends that base toward Xilinx-focused embedded debugging in Visual Studio Code.

