Visual Studio Debugger - Natvis file

I've just spent an hour and a half persuading the Visual Studio debugger to display some basic JUCE objects nicely.  It's so bloody handy I think I'd better share it.  I've done Array's, ValueTrees and Var objects so far, which were bloody annoying before.  I'm taking suggestions for any other objects that need decoding while I'm on a roll ... 

I'll pop the magic file on github in a bit...

5 Likes

Cool, thanks for sharing!

Natvis documentation is well worth a read.   It should be compatible with VS2013 and 2015...

Here's the magic file anyway, installation instructions are at the top in a comment:

https://github.com/jcredland/juce-toys/blob/master/juce.natvis

This is really cool!

Thank you! The first thing I thought about when seeing this feature VS feature was JUCE. I was hoping someone would make an attempt. I wanted to but I completely forgot about it. 

That's great! Didn't know about that feature.

more info on how to use: https://msdn.microsoft.com/en-us/library/jj620914.aspx

You are a beautiful human being.

Is there any way we could get Projucer to add these via the Visual Studio exporter?

1 Like

The JUCE team are very welcome to take over any of the code in the jcf_debug module including the natvis file and embed it in JUCE :slight_smile:

1 Like

Could we get this for xcode? Does xcode support doing this? It would be awesome to be able to inspect Array<>!!

1 Like

Yeah, I’ve done it. See juce_lldb_xcode.py

2 Likes

I’m accepting payment in synthesisers.

3 Likes

:joy::joy:

hey it doens’t seem to work with xcode 10.1. xcode 10.1 shows the first element in the juce::Array<> when you inspect it in the debugger. when I install the script and try to inspect, I see this:

without the script, I see this:

Sorry, I’ve not made the jump to 10 yet. Feel free to have a dig at the file and see if you can fix it … I’m still doing 32-bit builds.