Menu

1 / 2

Day 5: Building VS Code Extension in Public

DEV Community·Khishamuddin Syed·6 months ago
#tuH5yX2m
#webdev#ai#vscode#line#comment
Reading 0:00
15s threshold

Day 5: The bugs I didn't see coming

Building DevFlow Suite in public a 7-day series documenting the full journey from idea to VS Code Marketplace.

I thought I was done. The features were working, the UI looked right, and the extension was loading without errors.

Then I started actually using it.

Here's what broke and more importantly, why it broke.

The comment scanner race condition

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

The delete event and the scan were both triggered by the same save. The delete hadn't flushed to state before the scanner ran.

Fix: queue the scan behind the delete. Simple. Finding it: 3 hours.

The line-number shift bug

When you delete a comment, every comment below it shifts up by one line. The extension was storing line references as static numbers.

Delete line 42.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.