Comments (9)
Change the source.extension.vsixmanifest file to this and it will install in visual studio professional 2019:
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="8F12C6F5-BE35-4DDD-B452-44811F0A3A4D" Version="1.0" Language="en-US" Publisher="Sample" />
<DisplayName>CppCustomVisualizer Debugger Sample</DisplayName>
<Description xml:space="preserve">CppCustomVisualizer Debugger Sample</Description>
</Metadata>
<Installation InstalledByMsi="false">
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[14.0, 17.0)" />
</Installation>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
</Prerequisites>
<Assets>
<Asset Type="DebuggerEngineExtension" Path="CppCustomVisualizer.vsdconfig" d:Source="File" />
<Asset Type="NativeVisualizer" Path="CppCustomVisualizer.natvis" />
</Assets>
</PackageManifest>
/Ruben
Edit; It seems like formatting of the xml code isn't preserved properly in the editor.
from concordextensibilitysamples.
use 3 backticks to paste as-is
from concordextensibilitysamples.
Also, there seem to be x64 versions, but .vsix doesn't build with x64 version.
The x86 solution configuration will build the custom visualizer project for both x86 and x64 and include both in the VSIX. See step 2 from here.
from concordextensibilitysamples.
Also, there seem to be x64 versions, but .vsix doesn't build with x64 version.
The x86 solution configuration will build the custom visualizer project for both x86 and x64 and include both in the VSIX. See step 2 from here.
Thanks, I've figured it out after I posted it here (and how to make it run on vs2019)
from concordextensibilitysamples.
I wanted to write my own visualizer and the only place to start is CppCustomVisualizer
, I wasn't able to find anything else. In hopes to make it better I'll share my experience/feedback:
- I recall with old visualizers (in vs2005-2008 era) it was easier to debug them, as I was able to build and run it in the same project without installing vs extension. Now it's unnecessarily complicated as I had to uninstall/install (and quit VS each time) and I wasn't even able to debug visualizer itself.
- I started with the sample and had to search/replace to rename it. It's not clear where and which GUIDs I'd need to change to make it different (according to VS) from
CppCustomVisualizer
. At first VS refused to install it (as I didn't update GUIDs), and then when I updated them, it simply didn't work (perhaps I changed too many GUIDs). So, I simply settled on using the same code asCppCustomVisualizer
itself. Sample should list what guilds need to be changed and where.
from concordextensibilitysamples.
The good thing about the CppCustomVisualizer sample is that it actually starts a new Visual Studio instance with the TargetApp and the visualizer dll installed via the .vsix (startup) project when running a debug session on the CppCustomVisualizer project. When starting the debugger for the TargetApp, you can set breakpoints in the dll code in the other Visual Studio instance to see whats happening. No need to keep installing and uninstalling the .vsix file. Just close down the debugging for the TargetApp and the Visualizer dll will be installed from fresh in the next debugging session. Very nice.
I would like to have some more insight in how you would go about to do custom visualizers for more than one type/class in the same dll.
/Ruben
from concordextensibilitysamples.
@pps83 as maxruben mentioned, you shouldn't need to install/uninstall a .vsix for normal development-time debugging. The VSIX project's build will take care of 'installing' the vsix into the 'experimental instance' of VS. In case you didn't see them, there are instructions here.
from concordextensibilitysamples.
@gregg-miskelly I tried to follow Running the Sample in Visual Studio but it doesn't work. When I hit F5, I get a new vs2019 started but it doesn't load TargetApp.sln and offers me to open a project. If I open TargetApp.sln manually and try to debug, I don't get visualizers working for FILETIME.
Also, as @maxruben mentioned, it's not clear how to make visualizers that work for multiple types. That should be explained/shown in the example.
from concordextensibilitysamples.
@pps83 For the issue of F5'ing not working, can you open a new issue? Please include:
- What version of VS you are using
- Did you clone the repo to a path with a space?
- A screen capture of your Visual Studio with solution explorer up, and the 'Debugging' property page of the .vsix project showing (see example below)
For the second question (multiple types): There are probably many different answers depending on how separate you want your implementations to be, but in the most simple case, just add the additional type to your natvis. You should be able to either reuse the same VisualizerId, or declare a new one. If you decide to declare a new one, you could either declare multiple classes (one for each VisualizerId) or you could have one class that handles them all. In the later case, your .vsdconfigxml would look like this:
<Implements>
<InterfaceGroup>
<Filter>
<!-- Example of supporting three different visualizers. -->
<VisualizerId RequiredValue="D3C901B3-8005-435E-803D-DF43E6C3ED29"/>
<VisualizerId RequiredValue="748F6A19-A624-4026-A39C-8019532B586E"/>
<VisualizerId RequiredValue="D6DFE1A0-4A83-4BAC-B3BB-0FB8BF9149DA"/>
</Filter>
<Interface Name="IDkmCustomVisualizer"/>
</InterfaceGroup>
</Implements>
from concordextensibilitysamples.
Related Issues (20)
- How to change the value of an argument at a breakpoint?
- Breaking changes HOT 1
- How to enable debugging client code in Blazor
- "IEnumerable Visualizer" support for our language HOT 6
- Instructions in code are not correct. HOT 1
- Debugging instructions may need clarification with the latest VS 2022 & Child Process Power Tool since I couldn't get it to work HOT 1
- IEnumerable Visualizer shows properties that are marked with attribute to hide them in the debugger HOT 1
- Obtaining debug symbol paths from options HOT 3
- Is it possible to run certain threads when Debug Engine stopped in "break mode"? HOT 1
- .Net 8 problems HOT 1
- Difficulties calling function on Complex struct types such as lua_State
- Adding code showing how to add Child items
- This repo is missing important files
- Recent VsDbg versions missing System.Threading.Tasks.dll assembly HOT 4
- Announcement: New releases of C# vsdbg HOT 7
- Unable to load custom VsDbg extensions in linux/WSL using VS 17.7 Preview HOT 6
- Debugger UI integration
- Unable to use IrisExtension following the wiki HOT 3
- $CALLSTACK and $CALLER in Debugger Trace points HOT 4
- Feature request: Allow other .NET languages to participate in Edit and Continue/Hot Reload HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from concordextensibilitysamples.