Intro to Visual Studio Code Debug Visualizer

bunlong

Bunlong

Posted on November 14, 2020

Intro to Visual Studio Code Debug Visualizer

Debug Visualizer is a vscode extension for visualizing data structures while debugging.

Supported Languages

These languages and debuggers are verified to work with this extension: JavaScript/TypeScript, Go, Python, C#, PHP, Java, C++, Swift, Rust.

Installation

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install hediet.debug-visualizer
Enter fullscreen mode Exit fullscreen mode

Usage

After installing this extension go to View and click on Command Palette (Ctrl + Shift +P) of VS Code.

Command Palette

And use the command Debug Visualizer: New View to open a new visualizer view.

Debug Visualizer: New View

Visualizer view:

Debug Visualizer

And then go to View and click on Command Palette (Ctrl + Shift +P) of VS Code again.

Command Palette

And use the command Debug Visualizer: Use Selection as Expression (Shift + F1) to use the currently selected text as expression in the most recently opened debug visualizer.

Debug Visualizer: Use Selection as Expression

Download sample JavaScript repository here and following command line:

$ cd demos/js
$ npm install
$ npm run dev
Enter fullscreen mode Exit fullscreen mode

Open demo_sorting.ts in Visual Studio Code and set breakpoint at line 69.

Visual Studio Code and set breakpoint at line 69

And then go to Run and click on Start Debugging (F5) of VS Code.

Start Debugging

And then input the variable array that you want to debug.

Debug Visualizer Input

Debug Visualizer show the graph as following.

Debug Visualizer Graph


Thanks for reading ❤

Follow us to catch the newest Algorithms articles:

💖 💪 🙅 🚩
bunlong
Bunlong

Posted on November 14, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related