<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>svnscha - kernel-debugging</title>
    <subtitle>automating annoying tasks, sharing tips, and embracing less frustration</subtitle>
    <link rel="self" type="application/atom+xml" href="https://svnscha.de/tags/kernel-debugging/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://svnscha.de"/>
    <generator uri="https://astro.build/">Astro</generator>
    <updated>2026-09-30T00:00:00+00:00</updated>
    <id>https://svnscha.de/tags/kernel-debugging/atom.xml</id>
    <entry xml:lang="en">
        <title>🚀 New Release: mcp-windbg 1.3.1</title>
        <published>2026-09-30T00:00:00+00:00</published>
        <updated>2026-09-30T00:00:00+00:00</updated>
        <author>
          <name>Sven Scharmentke</name>
        </author>
        <link rel="alternate" type="text/html" href="https://svnscha.de/posts/mcp-windbg-1-3-1-release/"/>
        <id>https://svnscha.de/posts/mcp-windbg-1-3-1-release/</id>
        <summary type="html">Break-in while a command runs, partial output on timeouts, and a debugger that exits is reported right away. Three of the four fixes came from the community.</summary>
        <content type="html" xml:base="https://svnscha.de/posts/mcp-windbg-1-3-1-release/">&lt;p&gt;Version 1.3.1 of &lt;strong&gt;mcp-windbg&lt;/strong&gt; is out. It's a bug fix release about the moments when the debugger is slow, stuck, or gone, which is exactly when you need it to behave.&lt;/p&gt;
&lt;p&gt;Three of the four fixes were contributed by the community. Thanks to &lt;a href=&quot;https://github.com/adity982&quot;&gt;@adity982&lt;/a&gt;, &lt;a href=&quot;https://github.com/Oscar-Williams&quot;&gt;@Oscar-Williams&lt;/a&gt;, and &lt;a href=&quot;https://github.com/RamanaIntel&quot;&gt;@RamanaIntel&lt;/a&gt; for the pull requests, and for the tests that came with them.&lt;/p&gt;
&lt;h2 id=&quot;break-in-while-a-command-is-running&quot;&gt;Break-In While a Command Is Running&lt;/h2&gt;
&lt;p&gt;Until now, a tool call that waited on the debugger held up every other tool call. A slow &lt;code&gt;!analyze -v&lt;/code&gt; or a &lt;code&gt;wait_for_break&lt;/code&gt; on a running kernel target meant that &lt;code&gt;send_ctrl_break&lt;/code&gt;, the one tool meant to get you out of that situation, sat in the queue behind it (&lt;a href=&quot;https://github.com/svnscha/mcp-windbg/issues/109&quot;&gt;issue #109&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/adity982&quot;&gt;@adity982&lt;/a&gt; moved debugger startup, commands, and shutdown onto worker threads in &lt;a href=&quot;https://github.com/svnscha/mcp-windbg/pull/110&quot;&gt;#110&lt;/a&gt;. &lt;code&gt;send_ctrl_break&lt;/code&gt; stays on the request loop, so it gets through even when every worker is busy. Two &lt;code&gt;close&lt;/code&gt; calls on the same session also no longer race: the first one closes it, and the second is told the session is gone.&lt;/p&gt;
&lt;h2 id=&quot;partial-output-when-a-command-times-out&quot;&gt;Partial Output When a Command Times Out&lt;/h2&gt;
&lt;p&gt;SOS &lt;code&gt;!clrstack&lt;/code&gt; can get stuck printing the same &lt;code&gt;ComMethodFrame&lt;/code&gt; over and over. The server used to wait for the command to finish, hit the timeout, and throw away everything it had read, including the useful frames at the top (&lt;a href=&quot;https://github.com/svnscha/mcp-windbg/issues/112&quot;&gt;issue #112&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;With &lt;a href=&quot;https://github.com/Oscar-Williams&quot;&gt;@Oscar-Williams&lt;/a&gt;' fix in &lt;a href=&quot;https://github.com/svnscha/mcp-windbg/pull/114&quot;&gt;#114&lt;/a&gt;, the timeout error includes the output read so far. It's capped at 2,000 lines and 64 KiB, so a runaway command can't flood the model's context with the same frame a few thousand times.&lt;/p&gt;
&lt;h2 id=&quot;a-debugger-that-exits-is-reported-right-away&quot;&gt;A Debugger That Exits Is Reported Right Away&lt;/h2&gt;
&lt;p&gt;When &lt;code&gt;cdb.exe&lt;/code&gt; or &lt;code&gt;kd.exe&lt;/code&gt; exited, nothing noticed. Typing &lt;code&gt;q&lt;/code&gt;, a mistyped &lt;code&gt;-remote&lt;/code&gt; server, a bad &lt;code&gt;-k&lt;/code&gt; connection string, or the debugger itself crashing all ended the same way: every pending call waited out its full timeout, which is up to five minutes for &lt;code&gt;wait_for_break&lt;/code&gt;, and then reported a timeout.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/RamanaIntel&quot;&gt;@RamanaIntel&lt;/a&gt;'s &lt;a href=&quot;https://github.com/svnscha/mcp-windbg/pull/115&quot;&gt;#115&lt;/a&gt; watches for the debugger's output to end. The error now arrives immediately with the exit code and the debugger's last lines, which usually say what went wrong:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Debugger process exited (exit code 0x80070057) before the kernel target connected.&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Last debugger output:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Kernel debugger failed initialization, Win32 error 0n87&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;    &quot;The parameter is incorrect.&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Commands on a session whose debugger has exited now fail straight away and tell you to open a new session.&lt;/p&gt;
&lt;h2 id=&quot;no-more-stack-traces-in-tool-errors&quot;&gt;No More Stack Traces in Tool Errors&lt;/h2&gt;
&lt;p&gt;I found this one while testing the release. Every tool error carried a full Python stack trace, and the last line of that trace repeats the error message. With partial output in the message, a single timeout on &lt;code&gt;!process 0 7&lt;/code&gt; came back as 133 KB of text, all of it twice. Debugger errors now return only their message, and that same timeout comes back at 61 KB.&lt;/p&gt;
&lt;h2 id=&quot;tested-against-a-real-kernel-target&quot;&gt;Tested Against a Real Kernel Target&lt;/h2&gt;
&lt;p&gt;CI has no kernel target, so before releasing I ran the kernel scenarios and a set of end-to-end checks against a Hyper-V VM over KDNET. Through a real MCP client:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;send_ctrl_break&lt;/code&gt; answered immediately while &lt;code&gt;!process 0 7&lt;/code&gt; was running and cut a command with a three-minute timeout down to five seconds.&lt;/li&gt;
&lt;li&gt;Other tools answered while &lt;code&gt;wait_for_break&lt;/code&gt; was blocking, and a break-in ended the wait.&lt;/li&gt;
&lt;li&gt;A bad &lt;code&gt;-k&lt;/code&gt; string failed in 0.2 seconds with kd's own error message instead of a connect timeout.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One thing worth knowing from that testing: running &lt;code&gt;q&lt;/code&gt; in a kernel session ends &lt;code&gt;kd.exe&lt;/code&gt;, but the target machine stays halted at the break. mcp-windbg now tells you the debugger exited, but to leave the machine running, use &lt;code&gt;close_kd_session&lt;/code&gt; instead, which resumes the target by default.&lt;/p&gt;
&lt;h2 id=&quot;upgrading&quot;&gt;Upgrading&lt;/h2&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;color:#DCDCAA&quot;&gt;pip&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;color:#569CD6&quot;&gt; -U&lt;/span&gt;&lt;span style=&quot;color:#CE9178&quot;&gt; mcp-windbg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you use the Claude Code plugin, update it:&lt;/p&gt;
&lt;pre class=&quot;astro-code dark-plus&quot; style=&quot;background-color:#1E1E1E;color:#D4D4D4; overflow-x: auto;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/plugin marketplace update mcp-windbg&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;/plugin update mcp-windbg-uvx@mcp-windbg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;See the full &lt;a href=&quot;https://github.com/svnscha/mcp-windbg/releases/tag/v1.3.1&quot;&gt;v1.3.1 release notes&lt;/a&gt; for details. If a debugger session still gets stuck in a way this release doesn't cover, please &lt;a href=&quot;https://github.com/svnscha/mcp-windbg/issues&quot;&gt;open an issue&lt;/a&gt;.&lt;/p&gt;
</content>
    </entry>
</feed>
