Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 2.28 KB

VisualStudioExtension.md

File metadata and controls

65 lines (48 loc) · 2.28 KB

Installing Visual Studio extension

Visual Studio marketplace

Open Extensions and Updates and in Online gallery search for SharpDebug.VS extension.

VSIX gallery will provide access to newest versions of extensions.

Open Options/Environment/Extensions and Updates. Add additional gallery: http://vsixgallery.com/feed/

Open Extensions and Updates and in new gallery search for SharpDebug.VS extension. Open VSIX Gallery installation

Automatic visualizations

std::any

Without extension: std::any before extension With extension installed: std::any with extension

cv::Mat (OpenCV images)

OpenCV images

User defined visualizations

In order to define new visualizations, you need to do following:

  1. Define initialization script that will define/reference user type
  2. Define NatVis file that will contain all the types that should be visualized

Initialization script

By default, engine will load initialization script relative to the default project location: `SharpDebug/init.csx'.

You can see more about how to define user types.

Learn more about how to reference user types in tutorials.

User type definition in NatVis

Here is an example NatVis file:

<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
    <Type Name="MyUserType">
        <CustomVisualizer VisualizerId="{401DAED1-A74F-49F3-9B03-66786EBF65B6}"/>
    </Type>
</AutoVisualizer>

Interactive mode

Learn more about easier scripting in interactive mode.

Open interactive mode window by clicking: View / Other Windows / C# DebugSript interactive window. VS intereactive mode Note that interactive mode is active only while in debugger break mode.

Executing scripts

Use #load command to execute scripts:

#load "script_path.csx"

Clearing interactive window

Use #clear command to clear interactive window.

Reseting interactive mode

#reset command will clear all stored variables and loaded scripts, start over and reload initialization script.