<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Khishamuddin Syed</title>
    <description>The latest articles on DEV Community by Khishamuddin Syed (@webkmsyed).</description>
    <link>https://dev.to/webkmsyed</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1302847%2F6e688acd-3393-4f40-9c53-e9a24d453d22.jpg</url>
      <title>DEV Community: Khishamuddin Syed</title>
      <link>https://dev.to/webkmsyed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/webkmsyed"/>
    <language>en</language>
    <item>
      <title>Day 5: Building VS Code Extension in Public</title>
      <dc:creator>Khishamuddin Syed</dc:creator>
      <pubDate>Mon, 11 May 2026 03:25:55 +0000</pubDate>
      <link>https://dev.to/webkmsyed/day-5-building-vs-code-extension-in-public-2d3g</link>
      <guid>https://dev.to/webkmsyed/day-5-building-vs-code-extension-in-public-2d3g</guid>
      <description>&lt;h2&gt;
  
  
  Day 5: The bugs I didn't see coming
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Building DevFlow Suite in public a 7-day series documenting the full journey from idea to VS Code Marketplace.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;I thought I was done. The features were working, the UI looked right, and the extension was loading without errors.&lt;/p&gt;

&lt;p&gt;Then I started actually using it.&lt;/p&gt;

&lt;p&gt;Here's what broke and more importantly, why it broke.&lt;/p&gt;

&lt;h3&gt;
  
  
  The comment scanner race condition
&lt;/h3&gt;

&lt;p&gt;DevFlow Suite automatically scans your workspace for inline &lt;code&gt;//&lt;/code&gt; comments on every file save. The problem: when you deleted a comment and saved, the scanner would sometimes re-surface it.&lt;/p&gt;

&lt;p&gt;The delete event and the scan were both triggered by the same save. The delete hadn't flushed to state before the scanner ran.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; queue the scan behind the delete. Simple. Finding it: 3 hours.&lt;/p&gt;

&lt;h3&gt;
  
  
  The line-number shift bug
&lt;/h3&gt;

&lt;p&gt;When you delete a comment, every comment below it shifts up by one line. The extension was storing line references as static numbers.&lt;/p&gt;

&lt;p&gt;Delete line 42. The comment that was on line 43 is now on 42 but the stored reference still says 43. It renders as missing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; switch to text-based matching instead of line-number matching for identity. One line of logic. Two days of confusion.&lt;/p&gt;

&lt;h3&gt;
  
  
  Windows path handling
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;fs.copyFileSync&lt;/code&gt; and &lt;code&gt;vscode.diff&lt;/code&gt; both behaved differently on Windows when mixing absolute and relative paths. The diff view would silently fail.&lt;/p&gt;

&lt;p&gt;I don't use Windows as my primary machine. I caught this only because someone else tested it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; always test path operations on Windows if your extension touches the filesystem.&lt;/p&gt;

&lt;h3&gt;
  
  
  The recycle bin ghost problem
&lt;/h3&gt;

&lt;p&gt;Items restored from the recycle bin would sometimes re-appear in trash on the next render. The &lt;code&gt;isInTrash&lt;/code&gt; check was using stale line numbers same root cause as the shift bug, different surface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; switch &lt;code&gt;isInTrash&lt;/code&gt; to text-based matching. Same pattern, different location.&lt;/p&gt;




&lt;h3&gt;
  
  
  What I learned from all of this
&lt;/h3&gt;

&lt;p&gt;VS Code extensions run in a strange environment. File events, webview persistence, command registration none of it behaves exactly like standard Node.js.&lt;/p&gt;

&lt;p&gt;The gap between "it works when I test it" and "it works reliably" is where all these bugs lived.&lt;/p&gt;

&lt;p&gt;The only real way to find them was to use the extension as if I hadn't built it.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;PRD DOC and Past Updates:&lt;/strong&gt; &lt;a href="https://devflow-suite.notion.site/" rel="noopener noreferrer"&gt;https://devflow-suite.notion.site/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgiri59lpbjugkqnzn9n5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgiri59lpbjugkqnzn9n5.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>vscode</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
