microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
816 stars 218 forks source link

`this` pointer in <DisplayString> expands with extra `{}` inclusions #1391

Open yh-sb opened 1 year ago

yh-sb commented 1 year ago

Environment

Bug Summary and Steps to Reproduce

Bug Summary: Value visualization for this pointer variables displays messy with the following natvis configuration. The issue is reproduced not only for int* type, but anytime if this pointer is present in DisplayString natvis value.

Source code:

int main(int argc, char *argv[])
{
    int i = 5;
    int *ptr = &i;

    return 0;
}

Natvis file:

<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
    <Type Name="int*">
        <DisplayString>{{ {this}={*this} }}</DisplayString>
    </Type>
</AutoVisualizer>

See ptr value with lot of redundant {}:

image

Expected result: { 0x2ee11ff6c4=5 }

Debugger Configurations

// launch.json
{
    "version": "0.2.0",
    "configurations":
    [
        {
            "name": "g++ active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "cwd": "${fileDirname}",
            "miDebuggerPath": "gdb",
            "internalConsoleOptions": "neverOpen",
            "preLaunchTask": "g++ active file",
            "showDisplayString": true,
            "visualizerFile": "${workspaceFolder}/.vscode/test.natvis"
        }
    ]
}

// tasks.json
{
    "tasks":
    [
        {
            "label": "g++ active file",
            "command": "g++",
            "args":
            [
                "-fdiagnostics-color=always",
                "-g",
                "-std=c++20",
                "${file}",
                "-o",
                "${fileDirname}/${fileBasenameNoExtension}"
            ],
            "options": { "cwd": "${fileDirname}" },
            "problemMatcher": [ "$gcc" ],
            "group": { "kind": "build" },
            "presentation": { "reveal": "silent" }
        }
    ],
    "version": "2.0.0"
}

Debugger Logs

DEBUG CONSOLE ```shell --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (50) LaunchOptions{\"name\":\"g++ active file\",\"type\":\"cppdbg\",\"request\":\"launch\",\"program\":\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples/vscode-natvis-int-ptr-bug\",\"cwd\":\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\",\"miDebuggerPath\":\"gdb\",\"internalConsoleOptions\":\"neverOpen\",\"preLaunchTask\":\"g++ active file\",\"showDisplayString\":true,\"visualizerFile\":\"D:\\\\dev\\\\c++\\\\cpp-examples/.vscode/test.natvis\",\"logging\":{\"engineLogging\":true,\"trace\":true,\"traceResponse\":true},\"__configurationTarget\":6,\"configSource\":\"workspaceFolder\",\"debugType\":\"debug\",\"__sessionId\":\"f071e615-5d4d-41d5-a12f-41ad7399372b\",\"MIMode\":\"gdb\"}\r\n"},"seq":2} 1: (50) LaunchOptions{"name":"g++ active file","type":"cppdbg","request":"launch","program":"D:\\dev\\c++\\cpp-examples\\examples/vscode-natvis-int-ptr-bug","cwd":"D:\\dev\\c++\\cpp-examples\\examples","miDebuggerPath":"gdb","internalConsoleOptions":"neverOpen","preLaunchTask":"g++ active file","showDisplayString":true,"visualizerFile":"D:\\dev\\c++\\cpp-examples/.vscode/test.natvis","logging":{"engineLogging":true,"trace":true,"traceResponse":true},"__configurationTarget":6,"configSource":"workspaceFolder","debugType":"debug","__sessionId":"f071e615-5d4d-41d5-a12f-41ad7399372b","MIMode":"gdb"} --> C (runInTerminal-4): {"type":"request","command":"runInTerminal","arguments":{"kind":"integrated","title":"cppdbg: vscode-natvis-int-ptr-bug","cwd":"","args":["c:\\Users\\admin\\.vscode\\extensions\\ms-vscode.cpptools-1.14.4-win32-x64\\debugAdapters\\bin\\WindowsDebugLauncher.exe","--stdin=Microsoft-MIEngine-In-jqx3taox.zhm","--stdout=Microsoft-MIEngine-Out-g0vazuaa.eeg","--stderr=Microsoft-MIEngine-Error-rpaedkk4.ze2","--pid=Microsoft-MIEngine-Pid-lu0kzola.53x","--dbgExe=C:\\Program Files\\mydevtools\\MinGW-w64\\bin\\gdb.exe","--interpreter=mi"],"env":{}},"seq":4} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (94) Wait for connection completion.\r\n"},"seq":6} 1: (94) Wait for connection completion. --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1497) ->=thread-group-added,id=\"i1\"\r\n"},"seq":8} 1: (1497) ->=thread-group-added,id="i1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1498) ->~\"GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders) 12.1\\n\"\r\n"},"seq":10} 1: (1498) ->~"GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders) 12.1\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->~\"Copyright (C) 2022 Free Software Foundation, Inc.\\n\"\r\n"},"seq":12} 1: (1499) ->~"Copyright (C) 2022 Free Software Foundation, Inc.\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->~\"License GPLv3+: GNU GPL version 3 or later \\nThis is free software: you are free to change and redistribute it.\\nThere is NO WARRANTY, to the extent permitted by law.\"\r\n"},"seq":14} 1: (1499) ->~"License GPLv3+: GNU GPL version 3 or later \nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law." --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->~\"\\nType \\\"show copying\\\" and \\\"show warranty\\\" for details.\\n\"\r\n"},"seq":16} 1: (1499) ->~"\nType \"show copying\" and \"show warranty\" for details.\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->~\"This GDB was configured as \\\"x86_64-w64-mingw32\\\".\\n\"\r\n"},"seq":18} 1: (1499) ->~"This GDB was configured as \"x86_64-w64-mingw32\".\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->~\"Type \\\"show configuration\\\" for configuration details.\\n\"\r\n"},"seq":20} 1: (1499) ->~"Type \"show configuration\" for configuration details.\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->~\"For bug reporting instructions, please see:\\n\"\r\n"},"seq":22} 1: (1499) ->~"For bug reporting instructions, please see:\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->~\".\\n\"\r\n"},"seq":24} 1: (1499) ->~".\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->~\"Find the GDB manual and other documentation resources online at:\\n .\"\r\n"},"seq":26} 1: (1499) ->~"Find the GDB manual and other documentation resources online at:\n ." --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->~\"\\n\\n\"\r\n"},"seq":28} 1: (1499) ->~"\n\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1499) ->~\"For help, type \\\"help\\\".\\n\"\r\n"},"seq":30} 1: (1499) ->~"For help, type \"help\".\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1500) ->~\"Type \\\"apropos word\\\" to search for commands related to \\\"word\\\".\\n\"\r\n"},"seq":32} 1: (1500) ->~"Type \"apropos word\" to search for commands related to \"word\".\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1500) ->(gdb)\r\n"},"seq":34} 1: (1500) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1503) <-1001-gdb-set mi-async on\r\n"},"seq":36} 1: (1503) <-1001-gdb-set mi-async on --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1515) ->1001^done\r\n"},"seq":38} 1: (1515) ->1001^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->(gdb)\r\n"},"seq":40} 1: (1516) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->&\"\\n\"\r\n"},"seq":42} 1: (1516) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->^done\r\n"},"seq":44} 1: (1516) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1516) ->(gdb)\r\n"},"seq":46} 1: (1516) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1517) 1001: elapsed time 15\r\n"},"seq":48} 1: (1517) 1001: elapsed time 15 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1520) <-1002-interpreter-exec console \"show configuration\"\r\n"},"seq":50} 1: (1520) <-1002-interpreter-exec console "show configuration" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1530) ->~\"This GDB was configured as follows:\\n configure --host=\"\r\n"},"seq":52} 1: (1530) ->~"This GDB was configured as follows:\n configure --host=" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"x86_64-w64-mingw32 --target=x86_64-w64-mingw32\\n\"\r\n"},"seq":54} 1: (1531) ->~"x86_64-w64-mingw32 --target=x86_64-w64-mingw32\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"\\t --with-auto-load-dir=$debugdir:$datadir/auto-load\\n\\t --with-auto-load-safe-path=\"\r\n"},"seq":56} 1: (1531) ->~"\t --with-auto-load-dir=$debugdir:$datadir/auto-load\n\t --with-auto-load-safe-path=" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"$debugdir:$datadir/auto-load\\n\"\r\n"},"seq":58} 1: (1531) ->~"$debugdir:$datadir/auto-load\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"\\t --with-expat\\n\"\r\n"},"seq":60} 1: (1531) ->~"\t --with-expat\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"\\t --with-gdb-datadir=/R/winlibs64-11.3.0ucrt/inst_gdb-12.1/share/gdb/share/gdb (relocatable)\\n\"\r\n"},"seq":62} 1: (1531) ->~"\t --with-gdb-datadir=/R/winlibs64-11.3.0ucrt/inst_gdb-12.1/share/gdb/share/gdb (relocatable)\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"\\t --with-jit-reader-dir=/R/winlibs64-11.3.0ucrt/inst_gdb-12.1/share/gdb/lib/gdb (relocatable)\\n\"\r\n"},"seq":64} 1: (1531) ->~"\t --with-jit-reader-dir=/R/winlibs64-11.3.0ucrt/inst_gdb-12.1/share/gdb/lib/gdb (relocatable)\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"\\t --without-libunwind-ia64\\n\"\r\n"},"seq":66} 1: (1531) ->~"\t --without-libunwind-ia64\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"\\t --with-lzma\\n\"\r\n"},"seq":68} 1: (1531) ->~"\t --with-lzma\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"\\t --without-babeltrace\\n\"\r\n"},"seq":70} 1: (1531) ->~"\t --without-babeltrace\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"\\t --without-intel-pt\\n\"\r\n"},"seq":72} 1: (1531) ->~"\t --without-intel-pt\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1531) ->~\"\\t --with-mpfr\\n\"\r\n"},"seq":74} 1: (1531) ->~"\t --with-mpfr\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->~\"\\t --with-xxhash\\n\"\r\n"},"seq":76} 1: (1532) ->~"\t --with-xxhash\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->~\"\\t --with-python=E:/Prog/winlibs64-11.3.0ucrt/custombuilt/share/python\\n\"\r\n"},"seq":78} 1: (1532) ->~"\t --with-python=E:/Prog/winlibs64-11.3.0ucrt/custombuilt/share/python\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->~\"\\t --with-python-libdir=/e/Prog/winlibs64-11.3.0ucrt/custombuilt/share/python/lib\\n\"\r\n"},"seq":80} 1: (1532) ->~"\t --with-python-libdir=/e/Prog/winlibs64-11.3.0ucrt/custombuilt/share/python/lib\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->~\"\\t --without-debuginfod\\n\"\r\n"},"seq":82} 1: (1532) ->~"\t --without-debuginfod\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->~\"\\t --without-guile\\n\"\r\n"},"seq":84} 1: (1532) ->~"\t --without-guile\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->~\"\\t --enable-source-highlight\\n\"\r\n"},"seq":86} 1: (1532) ->~"\t --enable-source-highlight\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->~\"\\t --with-separate-debug-dir=/R/winlibs64-11.3.0ucrt/inst_gdb-12.1/share/gdb/lib/debug (relocatable)\\n\"\r\n"},"seq":88} 1: (1532) ->~"\t --with-separate-debug-dir=/R/winlibs64-11.3.0ucrt/inst_gdb-12.1/share/gdb/lib/debug (relocatable)\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->~\"\\t --with-system-gdbinit=/R/winlibs64-11.3.0ucrt/inst_gdb-12.1/share/gdb/share/gdb/gdbinit (relocatable)\\n\"\r\n"},"seq":90} 1: (1532) ->~"\t --with-system-gdbinit=/R/winlibs64-11.3.0ucrt/inst_gdb-12.1/share/gdb/share/gdb/gdbinit (relocatable)\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->~\"\\n(\\\"Relocatable\\\" means the directory can be moved with the GDB installation\\ntree, and GDB will still find it.)\\n\"\r\n"},"seq":92} 1: (1532) ->~"\n(\"Relocatable\" means the directory can be moved with the GDB installation\ntree, and GDB will still find it.)\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->1002^done\r\n"},"seq":94} 1: (1532) ->1002^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) 1002: elapsed time 12\r\n"},"seq":96} 1: (1532) 1002: elapsed time 12 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1532) ->(gdb)\r\n"},"seq":98} 1: (1532) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1533) ->&\"\\n\"\r\n"},"seq":100} 1: (1533) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1533) ->^done\r\n"},"seq":102} 1: (1533) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1533) ->(gdb)\r\n"},"seq":104} 1: (1533) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/MIEngine/WindowsRuntime","data":{"VS.Diagnostics.Debugger.MIEngine.WindowsRuntime":"MinGW"}},"seq":106} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1544) <-1003-interpreter-exec console \"set pagination off\"\r\n"},"seq":108} 1: (1544) <-1003-interpreter-exec console "set pagination off" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1547) ->=cmd-param-changed,param=\"pagination\",value=\"off\"\r\n"},"seq":110} 1: (1547) ->=cmd-param-changed,param="pagination",value="off" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1547) ->1003^done\r\n"},"seq":112} 1: (1547) ->1003^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1547) 1003: elapsed time 2\r\n"},"seq":114} 1: (1547) 1003: elapsed time 2 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1547) <-1004-gdb-set auto-solib-add on\r\n"},"seq":116} 1: (1547) <-1004-gdb-set auto-solib-add on --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1547) ->(gdb)\r\n"},"seq":118} 1: (1547) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1547) ->&\"\\n\"\r\n"},"seq":120} 1: (1547) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1547) ->^done\r\n"},"seq":122} 1: (1547) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1547) ->(gdb)\r\n"},"seq":124} 1: (1547) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1563) ->1004^done\r\n"},"seq":126} 1: (1563) ->1004^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1563) ->(gdb)\r\n"},"seq":128} 1: (1563) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1563) 1004: elapsed time 16\r\n"},"seq":130} 1: (1563) 1004: elapsed time 16 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1563) ->&\"\\n\"\r\n"},"seq":132} 1: (1563) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1563) ->^done\r\n"},"seq":134} 1: (1563) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1563) ->(gdb)\r\n"},"seq":136} 1: (1563) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1563) <-1005-gdb-set solib-search-path D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples;\r\n"},"seq":138} 1: (1563) <-1005-gdb-set solib-search-path D:\\dev\\c++\\cpp-examples\\examples; --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1579) ->1005^done\r\n"},"seq":140} 1: (1579) ->1005^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1579) 1005: elapsed time 16\r\n"},"seq":142} 1: (1579) 1005: elapsed time 16 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1579) ->(gdb)\r\n"},"seq":144} 1: (1579) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1579) <-1006-environment-cd D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\r\n"},"seq":146} 1: (1579) <-1006-environment-cd D:\\dev\\c++\\cpp-examples\\examples --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1580) ->&\"\\n\"\r\n"},"seq":148} 1: (1580) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1580) ->^done\r\n"},"seq":150} 1: (1580) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1581) ->(gdb)\r\n"},"seq":152} 1: (1581) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1594) ->1006^done\r\n"},"seq":154} 1: (1594) ->1006^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1595) 1006: elapsed time 15\r\n"},"seq":156} 1: (1595) 1006: elapsed time 15 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1595) ->(gdb)\r\n"},"seq":158} 1: (1595) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1595) <-1007-file-exec-and-symbols D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples/vscode-natvis-int-ptr-bug\r\n"},"seq":160} 1: (1595) <-1007-file-exec-and-symbols D:\\dev\\c++\\cpp-examples\\examples/vscode-natvis-int-ptr-bug --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1595) ->&\"\\n\"\r\n"},"seq":162} 1: (1595) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1595) ->^done\r\n"},"seq":164} 1: (1595) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1595) ->(gdb)\r\n"},"seq":166} 1: (1595) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1613) ->1007^done\r\n"},"seq":168} 1: (1613) ->1007^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1614) 1007: elapsed time 18\r\n"},"seq":170} 1: (1614) 1007: elapsed time 18 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1614) ->(gdb)\r\n"},"seq":172} 1: (1614) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1614) <-1008-interpreter-exec console \"show architecture\"\r\n"},"seq":174} 1: (1614) <-1008-interpreter-exec console "show architecture" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1614) ->&\"\\n\"\r\n"},"seq":176} 1: (1614) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1614) ->^done\r\n"},"seq":178} 1: (1614) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1614) ->(gdb)\r\n"},"seq":180} 1: (1614) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1626) ->~\"The target architecture is set to \\\"auto\\\" (currently \\\"i386:x86-64\\\").\\n\"\r\n"},"seq":182} 1: (1626) ->~"The target architecture is set to \"auto\" (currently \"i386:x86-64\").\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1626) ->1008^done\r\n"},"seq":184} 1: (1626) ->1008^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1626) 1008: elapsed time 12\r\n"},"seq":186} 1: (1626) 1008: elapsed time 12 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1626) ->(gdb)\r\n"},"seq":188} 1: (1626) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1626) ->&\"\\n\"\r\n"},"seq":190} 1: (1626) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1626) ->^done\r\n"},"seq":192} 1: (1626) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1626) ->(gdb)\r\n"},"seq":194} 1: (1626) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1627) <-1009-exec-arguments 2>CON 1>CON CON 1>CON E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1642) ->1009^done\r\n"},"seq":198} 1: (1642) ->1009^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1642) 1009: elapsed time 14\r\n"},"seq":200} 1: (1642) 1009: elapsed time 14 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1642) <-1010-break-insert -f main\r\n"},"seq":202} 1: (1642) <-1010-break-insert -f main --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1642) ->(gdb)\r\n"},"seq":204} 1: (1642) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1642) ->&\"\\n\"\r\n"},"seq":206} 1: (1642) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1643) ->^done\r\n"},"seq":208} 1: (1643) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1643) ->(gdb)\r\n"},"seq":210} 1: (1643) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1660) ->1010^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00000001400017e4\",func=\"main(int, char**)\",file=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",fullname=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",line=\"4\",thread-groups=[\"i1\"],times=\"0\",original-location=\"main\"}\r\n"},"seq":212} 1: (1660) ->1010^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00000001400017e4",func="main(int, char**)",file="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",fullname="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",line="4",thread-groups=["i1"],times="0",original-location="main"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1660) ->(gdb)\r\n"},"seq":214} 1: (1660) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1660) ->&\"\\n\"\r\n"},"seq":216} 1: (1660) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1660) ->^done\r\n"},"seq":218} 1: (1660) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1661) ->(gdb)\r\n"},"seq":220} 1: (1661) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1668) 1010: elapsed time 25\r\n"},"seq":222} 1: (1668) 1010: elapsed time 25 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1672) Send Event AD7EngineCreateEvent\r\n"},"seq":224} 1: (1672) Send Event AD7EngineCreateEvent --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1673) Send Event AD7ProgramCreateEvent\r\n"},"seq":226} 1: (1673) Send Event AD7ProgramCreateEvent --> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/Launch","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"17.4.21117.1","VS.Diagnostics.Debugger.HostVersion":"17.4.21117.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Launch.Duration":1634,"VS.Diagnostics.Debugger.MIMode":null,"VS.Diagnostics.Debugger.FrameworkVersion":"6.0.1122.52304"}},"seq":228} --> R (launch-2): {"type":"response","request_seq":2,"success":true,"command":"launch","body":{},"seq":230} --> E (initialized): {"type":"event","event":"initialized","body":{},"seq":232} <-- R (runInTerminal-4) [1593 ms]: {"type":"response","seq":3,"command":"runInTerminal","request_seq":4,"success":true,"body":{"shellProcessId":14016}} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1689) ShellPid=15960\r\n"},"seq":235} 1: (1689) ShellPid=15960 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1694) DebuggerPid=6716\r\n"},"seq":237} 1: (1694) DebuggerPid=6716 <-- C (setBreakpoints-4): {"command":"setBreakpoints","arguments":{"source":{"name":"vscode-natvis-int-ptr-bug.cpp","path":"d:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp"},"lines":[7],"breakpoints":[{"line":7}],"sourceModified":false},"type":"request","seq":4} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1710) <-1011-break-insert -f vscode-natvis-int-ptr-bug.cpp:7\r\n"},"seq":240} 1: (1710) <-1011-break-insert -f vscode-natvis-int-ptr-bug.cpp:7 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1721) ->1011^done,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00000001400017f3\",func=\"main(int, char**)\",file=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",fullname=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",line=\"7\",thread-groups=[\"i1\"],times=\"0\",original-location=\"vscode-natvis-int-ptr-bug.cpp:7\"}\r\n"},"seq":242} 1: (1721) ->1011^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00000001400017f3",func="main(int, char**)",file="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",fullname="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",line="7",thread-groups=["i1"],times="0",original-location="vscode-natvis-int-ptr-bug.cpp:7"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1722) ->(gdb)\r\n"},"seq":244} 1: (1722) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1722) 1011: elapsed time 12\r\n"},"seq":246} 1: (1722) 1011: elapsed time 12 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1722) ->&\"\\n\"\r\n"},"seq":248} 1: (1722) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1722) ->^done\r\n"},"seq":250} 1: (1722) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1722) ->(gdb)\r\n"},"seq":252} 1: (1722) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1729) <-1012-symbol-list-lines D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\r\n"},"seq":254} 1: (1729) <-1012-symbol-list-lines D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1736) ->1012^done,lines=[{pc=\"0x00000001400017d0\",line=\"3\"},{pc=\"0x00000001400017df\",line=\"3\"},{pc=\"0x00000001400017e4\",line=\"4\"},{pc=\"0x00000001400017eb\",line=\"5\"},{pc=\"0x00000001400017f3\",line=\"7\"},{pc=\"0x00000001400017f8\",line=\"8\"},{pc=\"0x00000001400017fe\",line=\"0\"}]\r\n"},"seq":256} 1: (1736) ->1012^done,lines=[{pc="0x00000001400017d0",line="3"},{pc="0x00000001400017df",line="3"},{pc="0x00000001400017e4",line="4"},{pc="0x00000001400017eb",line="5"},{pc="0x00000001400017f3",line="7"},{pc="0x00000001400017f8",line="8"},{pc="0x00000001400017fe",line="0"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1736) ->(gdb)\r\n"},"seq":258} 1: (1736) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1736) ->&\"\\n\"\r\n"},"seq":260} 1: (1736) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1736) ->^done\r\n"},"seq":262} 1: (1736) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1736) ->(gdb)\r\n"},"seq":264} 1: (1736) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1736) 1012: elapsed time 7\r\n"},"seq":266} 1: (1736) 1012: elapsed time 7 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1742) Send Event AD7BreakpointBoundEvent\r\n"},"seq":268} 1: (1742) Send Event AD7BreakpointBoundEvent --> R (setBreakpoints-4): {"type":"response","request_seq":4,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"verified":true,"line":7,"BoundBreakpoints":[]}]},"seq":270} --> E (breakpoint): {"type":"event","event":"breakpoint","body":{"reason":"changed","breakpoint":{"id":1,"verified":true,"line":7,"BoundBreakpoints":[]}},"seq":272} <-- C (setFunctionBreakpoints-5): {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":5} --> R (setFunctionBreakpoints-5): {"type":"response","request_seq":5,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]},"seq":275} <-- C (setDataBreakpoints-6): {"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":6} --> R (setDataBreakpoints-6): {"type":"response","request_seq":6,"success":true,"command":"setDataBreakpoints","body":{"breakpoints":[]},"seq":278} <-- C (setInstructionBreakpoints-7): {"command":"setInstructionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":7} --> R (setInstructionBreakpoints-7): {"type":"response","request_seq":7,"success":true,"command":"setInstructionBreakpoints","body":{"breakpoints":[]},"seq":281} <-- C (setExceptionBreakpoints-8): {"command":"setExceptionBreakpoints","arguments":{"filters":[],"filterOptions":[{"filterId":"all"}]},"type":"request","seq":8} --> R (setExceptionBreakpoints-8): {"type":"response","request_seq":8,"success":true,"command":"setExceptionBreakpoints","body":{"breakpoints":[]},"seq":284} <-- C (configurationDone-9): {"command":"configurationDone","type":"request","seq":9} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1795) Send Event AD7LoadCompleteEvent\r\n"},"seq":288} 1: (1795) Send Event AD7LoadCompleteEvent --> R (configurationDone-9): {"type":"response","request_seq":9,"success":true,"command":"configurationDone","body":{},"seq":287} --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"=thread-group-added,id=\"i1\"\nGNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders) 12.1\nCopyright (C) 2022 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later \nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\nType \"show copying\" and \"show warranty\" for details.\nThis GDB was configured as \"x86_64-w64-mingw32\".\nType \"show configuration\" for configuration details.\nFor bug reporting instructions, please see:\n.\nFind the GDB manual and other documentation resources online at:\n .\n\nFor help, type \"help\".\nType \"apropos word\" to search for commands related to \"word\".\nWarning: Debuggee TargetArchitecture not detected, assuming x86_64.\n=cmd-param-changed,param=\"pagination\",value=\"off\"\n"},"seq":291} =thread-group-added,id="i1" GNU gdb (GDB for MinGW-W64 x86_64, built by Brecht Sanders) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-w64-mingw32". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". Warning: Debuggee TargetArchitecture not detected, assuming x86_64. =cmd-param-changed,param="pagination",value="off" <-- C (threads-10): {"command":"threads","type":"request","seq":10} --> R (threads-10): {"type":"response","request_seq":10,"success":true,"command":"threads","body":{"threads":[]},"seq":294} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1807) <-1013-catch-throw\r\n"},"seq":296} 1: (1807) <-1013-catch-throw --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1816) ->1013^done,bkpt={number=\"3\",type=\"catchpoint\",disp=\"keep\",enabled=\"y\",what=\"exception throw\",catch-type=\"throw\",times=\"0\"}\r\n"},"seq":298} 1: (1816) ->1013^done,bkpt={number="3",type="catchpoint",disp="keep",enabled="y",what="exception throw",catch-type="throw",times="0"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1816) 1013: elapsed time 8\r\n"},"seq":300} 1: (1816) 1013: elapsed time 8 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1816) ->(gdb)\r\n"},"seq":302} 1: (1816) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1816) ->&\"\\n\"\r\n"},"seq":304} 1: (1816) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1816) ->^done\r\n"},"seq":306} 1: (1816) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1816) ->(gdb)\r\n"},"seq":308} 1: (1816) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1819) <-1014-exec-run\r\n"},"seq":310} 1: (1819) <-1014-exec-run --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2422) ->=thread-group-started,id=\"i1\",pid=\"8224\"\r\n"},"seq":312} 1: (2422) ->=thread-group-started,id="i1",pid="8224" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2422) ->=thread-created,id=\"1\",group-id=\"i1\"\r\n"},"seq":314} 1: (2422) ->=thread-created,id="1",group-id="i1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2424) <-1015-thread-info 1\r\n"},"seq":316} 1: (2424) <-1015-thread-info 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2425) ->=thread-created,id=\"2\",group-id=\"i1\"\r\n"},"seq":318} 1: (2425) ->=thread-created,id="2",group-id="i1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2425) ->~\"[New Thread 8224.0x3ef8]\\n\"\r\n"},"seq":320} 1: (2425) ->~"[New Thread 8224.0x3ef8]\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2426) <-1016-thread-info 2\r\n"},"seq":322} 1: (2426) <-1016-thread-info 2 --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"[New Thread 8224.0x3ef8]\n"},"seq":324} [New Thread 8224.0x3ef8] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2426) ->=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00007ff6164f17e4\",func=\"main(int, char**)\",file=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",fullname=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",line=\"4\",thread-groups=[\"i1\"],times=\"0\",original-location=\"main\"}\r\n"},"seq":326} 1: (2426) ->=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00007ff6164f17e4",func="main(int, char**)",file="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",fullname="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",line="4",thread-groups=["i1"],times="0",original-location="main"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2427) ->=breakpoint-modified,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00007ff6164f17f3\",func=\"main(int, char**)\",file=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",fullname=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",line=\"7\",thread-groups=[\"i1\"],times=\"0\",original-location=\"vscode-natvis-int-ptr-bug.cpp:7\"}\r\n"},"seq":328} 1: (2427) ->=breakpoint-modified,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x00007ff6164f17f3",func="main(int, char**)",file="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",fullname="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",line="7",thread-groups=["i1"],times="0",original-location="vscode-natvis-int-ptr-bug.cpp:7"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2427) ->=library-loaded,id=\"C:\\\\Windows\\\\SYSTEM32\\\\ntdll.dll\",target-name=\"C:\\\\Windows\\\\SYSTEM32\\\\ntdll.dll\",host-name=\"C:\\\\Windows\\\\SYSTEM32\\\\ntdll.dll\",symbols-loaded=\"0\",thread-group=\"i1\",ranges=[{from=\"0x00007ffb01851000\",to=\"0x00007ffb01a63618\"}]\r\n"},"seq":330} 1: (2427) ->=library-loaded,id="C:\\Windows\\SYSTEM32\\ntdll.dll",target-name="C:\\Windows\\SYSTEM32\\ntdll.dll",host-name="C:\\Windows\\SYSTEM32\\ntdll.dll",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffb01851000",to="0x00007ffb01a63618"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2428) ->=library-loaded,id=\"C:\\\\Windows\\\\System32\\\\kernel32.dll\",target-name=\"C:\\\\Windows\\\\System32\\\\kernel32.dll\",host-name=\"C:\\\\Windows\\\\System32\\\\kernel32.dll\",symbols-loaded=\"0\",thread-group=\"i1\",ranges=[{from=\"0x00007ffaffc31000\",to=\"0x00007ffaffcf2380\"}]\r\n"},"seq":332} 1: (2428) ->=library-loaded,id="C:\\Windows\\System32\\kernel32.dll",target-name="C:\\Windows\\System32\\kernel32.dll",host-name="C:\\Windows\\System32\\kernel32.dll",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffaffc31000",to="0x00007ffaffcf2380"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2428) ->=library-loaded,id=\"C:\\\\Windows\\\\System32\\\\KernelBase.dll\",target-name=\"C:\\\\Windows\\\\System32\\\\KernelBase.dll\",host-name=\"C:\\\\Windows\\\\System32\\\\KernelBase.dll\",symbols-loaded=\"0\",thread-group=\"i1\",ranges=[{from=\"0x00007ffafef51000\",to=\"0x00007ffaff2eb734\"}]\r\n"},"seq":334} 1: (2428) ->=library-loaded,id="C:\\Windows\\System32\\KernelBase.dll",target-name="C:\\Windows\\System32\\KernelBase.dll",host-name="C:\\Windows\\System32\\KernelBase.dll",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffafef51000",to="0x00007ffaff2eb734"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2429) ->=library-loaded,id=\"C:\\\\Windows\\\\SYSTEM32\\\\apphelp.dll\",target-name=\"C:\\\\Windows\\\\SYSTEM32\\\\apphelp.dll\",host-name=\"C:\\\\Windows\\\\SYSTEM32\\\\apphelp.dll\",symbols-loaded=\"0\",thread-group=\"i1\",ranges=[{from=\"0x00007ffafbc01000\",to=\"0x00007ffafbc96780\"}]\r\n"},"seq":336} 1: (2429) ->=library-loaded,id="C:\\Windows\\SYSTEM32\\apphelp.dll",target-name="C:\\Windows\\SYSTEM32\\apphelp.dll",host-name="C:\\Windows\\SYSTEM32\\apphelp.dll",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffafbc01000",to="0x00007ffafbc96780"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2429) ->=library-loaded,id=\"C:\\\\Windows\\\\System32\\\\ucrtbase.dll\",target-name=\"C:\\\\Windows\\\\System32\\\\ucrtbase.dll\",host-name=\"C:\\\\Windows\\\\System32\\\\ucrtbase.dll\",symbols-loaded=\"0\",thread-group=\"i1\",ranges=[{from=\"0x00007ffafee31000\",to=\"0x00007ffafef40b24\"}]\r\n"},"seq":338} 1: (2429) ->=library-loaded,id="C:\\Windows\\System32\\ucrtbase.dll",target-name="C:\\Windows\\System32\\ucrtbase.dll",host-name="C:\\Windows\\System32\\ucrtbase.dll",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffafee31000",to="0x00007ffafef40b24"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2429) <-1017-symbol-list-lines D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\r\n"},"seq":340} 1: (2429) <-1017-symbol-list-lines D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2474) ->1014^running\r\n"},"seq":342} 1: (2474) ->1014^running --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2474) 1014: elapsed time 654\r\n"},"seq":344} 1: (2474) 1014: elapsed time 654 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2474) ->*running,thread-id=\"all\"\r\n"},"seq":346} 1: (2474) ->*running,thread-id="all" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2474) ->(gdb)\r\n"},"seq":348} 1: (2474) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2475) ->=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x00007ff6164f17e4\",func=\"main(int, char**)\",file=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",fullname=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",line=\"4\",thread-groups=[\"i1\"],times=\"1\",original-location=\"main\"}\r\n"},"seq":350} 1: (2475) ->=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x00007ff6164f17e4",func="main(int, char**)",file="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",fullname="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",line="4",thread-groups=["i1"],times="1",original-location="main"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2475) ->~\"\\n\"\r\n"},"seq":352} 1: (2475) ->~"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2475) ->~\"Thread 1 hit Breakpoint 1, main (argc=1, argv=0x17115a3d4f0) at D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp:4\\n\"\r\n"},"seq":354} 1: (2475) ->~"Thread 1 hit Breakpoint 1, main (argc=1, argv=0x17115a3d4f0) at D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp:4\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2475) ->~\"4\\t int i = 5;\\n\"\r\n"},"seq":356} 1: (2475) ->~"4\t int i = 5;\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2475) ->*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"1\",frame={addr=\"0x00007ff6164f17e4\",func=\"main\",args=[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\"0x17115a3d4f0\"}],file=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",fullname=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",line=\"4\",arch=\"i386:x86-64\"},thread-id=\"1\",stopped-threads=\"all\"\r\n"},"seq":358} 1: (2475) ->*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="0x00007ff6164f17e4",func="main",args=[{name="argc",value="1"},{name="argv",value="0x17115a3d4f0"}],file="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",fullname="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",line="4",arch="i386:x86-64"},thread-id="1",stopped-threads="all" --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"\n"},"seq":360} --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"Thread 1 hit Breakpoint 1, main (argc=1, argv=0x17115a3d4f0) at D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp:4\n"},"seq":362} Thread 1 hit Breakpoint 1, main (argc=1, argv=0x17115a3d4f0) at D:\dev\c++\cpp-examples\examples\vscode-natvis-int-ptr-bug.cpp:4 --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"4\t int i = 5;\n"},"seq":364} 4 int i = 5; --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->(gdb)\r\n"},"seq":366} 1: (2480) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->&\"\\n\"\r\n"},"seq":368} 1: (2480) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->^done\r\n"},"seq":370} 1: (2480) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->(gdb)\r\n"},"seq":372} 1: (2480) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->1015^done,threads=[{id=\"1\",target-id=\"Thread 8224.0x5c0\",frame={level=\"0\",addr=\"0x00007ff6164f17e4\",func=\"main\",args=[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\"0x17115a3d4f0\"}],file=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",fullname=\"D:\\\\dev\\\\c++\\\\cpp-examples\\\\examples\\\\vscode-natvis-int-ptr-bug.cpp\",line=\"4\",arch=\"i386:x86-64\"},state=\"stopped\"}]\r\n"},"seq":374} 1: (2480) ->1015^done,threads=[{id="1",target-id="Thread 8224.0x5c0",frame={level="0",addr="0x00007ff6164f17e4",func="main",args=[{name="argc",value="1"},{name="argv",value="0x17115a3d4f0"}],file="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",fullname="D:\\dev\\c++\\cpp-examples\\examples\\vscode-natvis-int-ptr-bug.cpp",line="4",arch="i386:x86-64"},state="stopped"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->(gdb)\r\n"},"seq":376} 1: (2480) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->&\"\\n\"\r\n"},"seq":378} 1: (2480) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->^done\r\n"},"seq":380} 1: (2480) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->(gdb)\r\n"},"seq":382} 1: (2480) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->1016^done,threads=[{id=\"2\",target-id=\"Thread 8224.0x3ef8\",frame={level=\"0\",addr=\"0x00007ffb018f2a54\",func=\"ntdll!ZwWaitForWorkViaWorkerFactory\",args=[],from=\"C:\\\\Windows\\\\SYSTEM32\\\\ntdll.dll\",arch=\"i386:x86-64\"},state=\"stopped\"}]\r\n"},"seq":384} 1: (2480) ->1016^done,threads=[{id="2",target-id="Thread 8224.0x3ef8",frame={level="0",addr="0x00007ffb018f2a54",func="ntdll!ZwWaitForWorkViaWorkerFactory",args=[],from="C:\\Windows\\SYSTEM32\\ntdll.dll",arch="i386:x86-64"},state="stopped"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->(gdb)\r\n"},"seq":386} 1: (2480) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->&\"\\n\"\r\n"},"seq":388} 1: (2480) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->^done\r\n"},"seq":390} 1: (2480) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->(gdb)\r\n"},"seq":392} 1: (2480) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->1017^done,lines=[{pc=\"0x00007ff6164f17d0\",line=\"3\"},{pc=\"0x00007ff6164f17df\",line=\"3\"},{pc=\"0x00007ff6164f17e4\",line=\"4\"},{pc=\"0x00007ff6164f17eb\",line=\"5\"},{pc=\"0x00007ff6164f17f3\",line=\"7\"},{pc=\"0x00007ff6164f17f8\",line=\"8\"},{pc=\"0x00007ff6164f17fe\",line=\"0\"}]\r\n"},"seq":394} 1: (2480) ->1017^done,lines=[{pc="0x00007ff6164f17d0",line="3"},{pc="0x00007ff6164f17df",line="3"},{pc="0x00007ff6164f17e4",line="4"},{pc="0x00007ff6164f17eb",line="5"},{pc="0x00007ff6164f17f3",line="7"},{pc="0x00007ff6164f17f8",line="8"},{pc="0x00007ff6164f17fe",line="0"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2480) ->(gdb)\r\n"},"seq":396} 1: (2480) ->(gdb) (I removed some logs in the middle due to github issue size limitation 65535 characters) ........ 1: (3890) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3890) ->(gdb)\r\n"},"seq":1139} 1: (3890) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3901) ->1062^done,name=\"var35\",numchild=\"0\",value=\"5\",type=\"int\",thread-id=\"1\",has_more=\"0\"\r\n"},"seq":1141} 1: (3901) ->1062^done,name="var35",numchild="0",value="5",type="int",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3902) ->(gdb)\r\n"},"seq":1143} 1: (3902) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3902) 1062: elapsed time 13\r\n"},"seq":1145} 1: (3902) 1062: elapsed time 13 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3902) ->&\"\\n\"\r\n"},"seq":1147} 1: (3902) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3902) <-1063-var-create - * \"*(((((((ptr)))))))\"\r\n"},"seq":1149} 1: (3902) <-1063-var-create - * "*(((((((ptr)))))))" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3902) ->^done\r\n"},"seq":1151} 1: (3902) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3903) ->(gdb)\r\n"},"seq":1153} 1: (3903) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3917) ->1063^done,name=\"var36\",numchild=\"0\",value=\"5\",type=\"int\",thread-id=\"1\",has_more=\"0\"\r\n"},"seq":1155} 1: (3917) ->1063^done,name="var36",numchild="0",value="5",type="int",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3918) 1063: elapsed time 15\r\n"},"seq":1157} 1: (3918) 1063: elapsed time 15 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3918) ->(gdb)\r\n"},"seq":1159} 1: (3918) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3918) <-1064-var-create - * \"*((((((ptr))))))\"\r\n"},"seq":1161} 1: (3918) <-1064-var-create - * "*((((((ptr))))))" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3918) ->&\"\\n\"\r\n"},"seq":1163} 1: (3918) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3918) ->^done\r\n"},"seq":1165} 1: (3918) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3918) ->(gdb)\r\n"},"seq":1167} 1: (3918) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3919) ->1064^done,name=\"var37\",numchild=\"0\",value=\"5\",type=\"int\",thread-id=\"1\",has_more=\"0\"\r\n"},"seq":1169} 1: (3919) ->1064^done,name="var37",numchild="0",value="5",type="int",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3919) ->(gdb)\r\n"},"seq":1171} 1: (3919) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3919) 1064: elapsed time 0\r\n"},"seq":1173} 1: (3919) 1064: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3919) ->&\"\\n\"\r\n"},"seq":1175} 1: (3919) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3919) ->^done\r\n"},"seq":1177} 1: (3919) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3919) <-1065-var-create - * \"*(((((ptr)))))\"\r\n"},"seq":1179} 1: (3919) <-1065-var-create - * "*(((((ptr)))))" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3919) ->(gdb)\r\n"},"seq":1181} 1: (3919) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3933) ->1065^done,name=\"var38\",numchild=\"0\",value=\"5\",type=\"int\",thread-id=\"1\",has_more=\"0\"\r\n"},"seq":1183} 1: (3933) ->1065^done,name="var38",numchild="0",value="5",type="int",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3934) 1065: elapsed time 14\r\n"},"seq":1185} 1: (3934) 1065: elapsed time 14 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3934) ->(gdb)\r\n"},"seq":1187} 1: (3934) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3934) <-1066-var-create - * \"*((((ptr))))\"\r\n"},"seq":1189} 1: (3934) <-1066-var-create - * "*((((ptr))))" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3934) ->&\"\\n\"\r\n"},"seq":1191} 1: (3934) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3934) ->^done\r\n"},"seq":1193} 1: (3934) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3934) ->(gdb)\r\n"},"seq":1195} 1: (3934) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3934) ->1066^done,name=\"var39\",numchild=\"0\",value=\"5\",type=\"int\",thread-id=\"1\",has_more=\"0\"\r\n"},"seq":1197} 1: (3934) ->1066^done,name="var39",numchild="0",value="5",type="int",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3935) ->(gdb)\r\n"},"seq":1199} 1: (3935) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3935) 1066: elapsed time 0\r\n"},"seq":1201} 1: (3935) 1066: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3935) <-1067-var-create - * \"*(((ptr)))\"\r\n"},"seq":1203} 1: (3935) <-1067-var-create - * "*(((ptr)))" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3935) ->&\"\\n\"\r\n"},"seq":1205} 1: (3935) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3935) ->^done\r\n"},"seq":1207} 1: (3935) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3935) ->(gdb)\r\n"},"seq":1209} 1: (3935) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3935) ->1067^done,name=\"var40\",numchild=\"0\",value=\"5\",type=\"int\",thread-id=\"1\",has_more=\"0\"\r\n"},"seq":1211} 1: (3935) ->1067^done,name="var40",numchild="0",value="5",type="int",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3936) 1067: elapsed time 0\r\n"},"seq":1213} 1: (3936) 1067: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3936) ->(gdb)\r\n"},"seq":1215} 1: (3936) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3936) <-1068-var-create - * \"*((ptr))\"\r\n"},"seq":1217} 1: (3936) <-1068-var-create - * "*((ptr))" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3936) ->&\"\\n\"\r\n"},"seq":1219} 1: (3936) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3936) ->^done\r\n"},"seq":1221} 1: (3936) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3936) ->(gdb)\r\n"},"seq":1223} 1: (3936) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3953) ->1068^done,name=\"var41\",numchild=\"0\",value=\"5\",type=\"int\",thread-id=\"1\",has_more=\"0\"\r\n"},"seq":1225} 1: (3953) ->1068^done,name="var41",numchild="0",value="5",type="int",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3953) 1068: elapsed time 17\r\n"},"seq":1227} 1: (3953) 1068: elapsed time 17 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3953) ->(gdb)\r\n"},"seq":1229} 1: (3953) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3953) <-1069-var-create - * \"*(ptr)\"\r\n"},"seq":1231} 1: (3953) <-1069-var-create - * "*(ptr)" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3954) ->&\"\\n\"\r\n"},"seq":1233} 1: (3954) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3954) ->^done\r\n"},"seq":1235} 1: (3954) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3954) ->(gdb)\r\n"},"seq":1237} 1: (3954) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3972) ->1069^done,name=\"var42\",numchild=\"0\",value=\"5\",type=\"int\",thread-id=\"1\",has_more=\"0\"\r\n"},"seq":1239} 1: (3972) ->1069^done,name="var42",numchild="0",value="5",type="int",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3972) 1069: elapsed time 18\r\n"},"seq":1241} 1: (3972) 1069: elapsed time 18 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3972) ->(gdb)\r\n"},"seq":1243} 1: (3972) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3972) ->&\"\\n\"\r\n"},"seq":1245} 1: (3972) ->&"\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3972) ->^done\r\n"},"seq":1247} 1: (3972) ->^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3972) ->(gdb)\r\n"},"seq":1249} 1: (3972) ->(gdb) --> R (variables-15): {"type":"response","request_seq":15,"success":true,"command":"variables","body":{"variables":[{"name":"i","value":"5","type":"int","evaluateName":"i","variablesReference":0,"memoryReference":"0x0000000000000005"},{"name":"ptr","value":"{ { { { { { { { { 0x2ee11ff6c4=5 }=5 }=5 }=5 }=5 }=5 }=5 }=5 }=5 }","type":"int *","evaluateName":"ptr","variablesReference":1002,"memoryReference":"0x0000002ee11ff6c4"},{"name":"argc","value":"1","type":"int","evaluateName":"argc","variablesReference":0,"memoryReference":"0x0000000000000001"},{"name":"argv","value":"0x17115a3d4f0","type":"char **","evaluateName":"argv","variablesReference":1003,"memoryReference":"0x0000017115a3d4f0"}]},"seq":1251} ```

Other Extensions

Issue persists when other extensions disabled

Additional Information

No response

lorsanta commented 1 year ago

I did some digging, and I found the problem is present in visual studio too https://developercommunity.visualstudio.com/t/How-to-avoid-recursion-in-natvis-Display/404898. I think the best way to solve this is to cast this to (void*) as it's explained here.

I guess it could be possible to break the recursion by adding something like this:

--- a/src/MIDebugEngine/Natvis.Impl/Natvis.cs
+++ b/src/MIDebugEngine/Natvis.Impl/Natvis.cs
@@ -1216,7 +1216,13 @@ namespace Microsoft.MIDebugEngine.Natvis
                     Match m = s_expression.Match(format.Substring(i));
                     if (m.Success)
                     {
-                        string exprValue = GetExpressionValue(format.Substring(i + 1, m.Length - 2), variable, scopedNames);
+                        string exprValue;
+                        string expression = format.Substring(i + 1, m.Length - 2);
+                        IVariableInformation expressionVariable = GetExpression(format.Substring(i + 1, m.Length - 2), variable, scopedNames);
+                        if(expression == "this") // or maybe expressionVariable.TypeName == variable.TypeName
+                            exprValue = expressionVariable.Value;
+                        else
+                            exprValue = FormatDisplayString(expressionVariable).value;
                         value.Append(exprValue);

But it's tricky to get the exit condition right, and it may still not cover some corner cases.