Handles will now properly show up automatically dereferenced or NULL in Visual Studio's debug views

This commit is contained in:
Kah Wei 2022-09-25 20:28:01 +08:00
parent f6ef5a443d
commit 4e60b3495a
2 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="SHADE::Handle&lt;*&gt;">
<DisplayString Condition="library==nullptr">NULL</DisplayString>
<DisplayString>ID = {id.Data.Index} Version = {id.Data.Version} Type = {"$T1"} </DisplayString>
<Expand>
<ExpandedItem>(*library).objects.denseArray[(*library).objects.sparseArray[id.Data.Index]]</ExpandedItem>
</Expand>
</Type>
</AutoVisualizer>

View File

@ -15,7 +15,8 @@ project "SHADE_Engine"
"%{prj.location}/src/**.hpp", "%{prj.location}/src/**.hpp",
"%{prj.location}/src/**.c", "%{prj.location}/src/**.c",
"%{prj.location}/src/**.cpp", "%{prj.location}/src/**.cpp",
"%{prj.location}/src/**.glsl" "%{prj.location}/src/**.glsl",
"%{prj.location}/**.natvis"
} }
includedirs includedirs