diff options
author | Nao Pross <np@0hm.ch> | 2024-02-12 14:52:43 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-02-12 14:52:43 +0100 |
commit | eda5bc26f44ee9a6f83dcf8c91f17296d7fc509d (patch) | |
tree | bc2efa38ff4e350f9a111ac87065cd7ae9a911c7 /src/imgui/misc/debuggers | |
download | fsisotool-eda5bc26f44ee9a6f83dcf8c91f17296d7fc509d.tar.gz fsisotool-eda5bc26f44ee9a6f83dcf8c91f17296d7fc509d.zip |
Move into version control
Diffstat (limited to 'src/imgui/misc/debuggers')
-rw-r--r-- | src/imgui/misc/debuggers/README.txt | 16 | ||||
-rw-r--r-- | src/imgui/misc/debuggers/imgui.gdb | 12 | ||||
-rw-r--r-- | src/imgui/misc/debuggers/imgui.natstepfilter | 31 | ||||
-rw-r--r-- | src/imgui/misc/debuggers/imgui.natvis | 58 |
4 files changed, 117 insertions, 0 deletions
diff --git a/src/imgui/misc/debuggers/README.txt b/src/imgui/misc/debuggers/README.txt new file mode 100644 index 0000000..3f4ba83 --- /dev/null +++ b/src/imgui/misc/debuggers/README.txt @@ -0,0 +1,16 @@ + +HELPER FILES FOR POPULAR DEBUGGERS + +imgui.gdb + GDB: disable stepping into trivial functions. + (read comments inside file for details) + +imgui.natstepfilter + Visual Studio Debugger: disable stepping into trivial functions. + (read comments inside file for details) + +imgui.natvis + Visual Studio Debugger: describe Dear ImGui types for better display. + With this, types like ImVector<> will be displayed nicely in the debugger. + (read comments inside file for details) + diff --git a/src/imgui/misc/debuggers/imgui.gdb b/src/imgui/misc/debuggers/imgui.gdb new file mode 100644 index 0000000..000ff6e --- /dev/null +++ b/src/imgui/misc/debuggers/imgui.gdb @@ -0,0 +1,12 @@ +# GDB configuration to aid debugging experience + +# To enable these customizations edit $HOME/.gdbinit (or ./.gdbinit if local gdbinit is enabled) and add: +# add-auto-load-safe-path /path/to/imgui.gdb +# source /path/to/imgui.gdb +# +# More Information at: +# * https://sourceware.org/gdb/current/onlinedocs/gdb/gdbinit-man.html +# * https://sourceware.org/gdb/current/onlinedocs/gdb/Init-File-in-the-Current-Directory.html#Init-File-in-the-Current-Directory + +# Disable stepping into trivial functions +skip -rfunction Im(Vec2|Vec4|Strv|Vector|Span)::.+ diff --git a/src/imgui/misc/debuggers/imgui.natstepfilter b/src/imgui/misc/debuggers/imgui.natstepfilter new file mode 100644 index 0000000..6825c93 --- /dev/null +++ b/src/imgui/misc/debuggers/imgui.natstepfilter @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +.natstepfilter file for Visual Studio debugger. +Purpose: instruct debugger to skip some functions when using StepInto (F11) + +Since Visual Studio 2022 version 17.6 Preview 2 (currently available as a "Preview" build on March 14, 2023) +It is possible to add the .natstepfilter file to your project file and it will automatically be used. +(https://developercommunity.visualstudio.com/t/allow-natstepfilter-and-natjmc-to-be-included-as-p/561718) + +For older Visual Studio version prior to 2022 17.6 Preview 2: +* copy in %USERPROFILE%\Documents\Visual Studio XXXX\Visualizers (current user) +* or copy in %VsInstallDirectory%\Common7\Packages\Debugger\Visualizers (all users) +If you have multiple VS version installed, the version that matters is the one you are using the IDE/debugger +of (not the compiling toolset). This is supported since Visual Studio 2012. + +More information at: https://docs.microsoft.com/en-us/visualstudio/debugger/just-my-code?view=vs-2019#BKMK_C___Just_My_Code +--> + +<StepFilter xmlns="http://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010"> + + <!-- Disable stepping into trivial functions --> + <Function> + <Name>(ImVec2|ImVec4|ImStrv)::.+</Name> + <Action>NoStepInto</Action> + </Function> + <Function> + <Name>(ImVector|ImSpan).*::operator.+</Name> + <Action>NoStepInto</Action> + </Function> + +</StepFilter> diff --git a/src/imgui/misc/debuggers/imgui.natvis b/src/imgui/misc/debuggers/imgui.natvis new file mode 100644 index 0000000..13b6360 --- /dev/null +++ b/src/imgui/misc/debuggers/imgui.natvis @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +.natvis file for Visual Studio debugger. +Purpose: provide nicer views on data types used by Dear ImGui. + +To enable: +* include file in your VS project (most recommended: not intrusive and always kept up to date!) +* or copy in %USERPROFILE%\Documents\Visual Studio XXXX\Visualizers (current user) +* or copy in %VsInstallDirectory%\Common7\Packages\Debugger\Visualizers (all users) + +More information at: https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects?view=vs-2019 +--> + +<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> + +<Type Name="ImVector<*>"> + <DisplayString>{{Size={Size} Capacity={Capacity}}}</DisplayString> + <Expand> + <ArrayItems> + <Size>Size</Size> + <ValuePointer>Data</ValuePointer> + </ArrayItems> + </Expand> +</Type> + +<Type Name="ImSpan<*>"> + <DisplayString>{{Size={DataEnd-Data} }}</DisplayString> + <Expand> + <ArrayItems> + <Size>DataEnd-Data</Size> + <ValuePointer>Data</ValuePointer> + </ArrayItems> + </Expand> +</Type> + +<Type Name="ImVec2"> + <DisplayString>{{x={x,g} y={y,g}}}</DisplayString> +</Type> + +<Type Name="ImVec4"> + <DisplayString>{{x={x,g} y={y,g} z={z,g} w={w,g}}}</DisplayString> +</Type> + +<Type Name="ImRect"> + <DisplayString>{{Min=({Min.x,g} {Min.y,g}) Max=({Max.x,g} {Max.y,g}) Size=({Max.x-Min.x,g} {Max.y-Min.y,g})}}</DisplayString> + <Expand> + <Item Name="Min">Min</Item> + <Item Name="Max">Max</Item> + <Item Name="[Width]">Max.x - Min.x</Item> + <Item Name="[Height]">Max.y - Min.y</Item> + </Expand> +</Type> + +<Type Name="ImGuiWindow"> + <DisplayString>{{Name {Name,s} Active {(Active||WasActive)?1:0,d} Child {(Flags & 0x01000000)?1:0,d} Popup {(Flags & 0x04000000)?1:0,d} Hidden {(Hidden)?1:0,d}}</DisplayString> +</Type> + +</AutoVisualizer> |