- Open the SharpCodeSearch workspace in VS Code
- Press F5 to start debugging
- A new "Extension Development Host" window will open
In the Extension Development Host window:
- Open a folder containing C# files (.cs)
- Or use the
src/backend/folder itself as a test workspace
- Press Ctrl+Shift+P (Cmd+Shift+P on Mac)
- Type "Sharp Code Search: Search"
- Press Enter
- A webview panel titled "Sharp Code Search" should open
- You should see:
- Pattern input textarea
- Match case/Whole word checkboxes
- Search and Clear buttons
- Empty results section with "Enter a pattern and click Search"
Try entering these patterns:
$obj$.ToString()- Find all ToString() calls$method$($args$)- Find all method calls$expr$- Find all expressionsConsole.WriteLine- Literal text search
- Pattern validation on Search click
- Error message if pattern has unbalanced $ symbols
- Clear button should empty the input and reset results
- Enter pattern:
$obj$.ToString() - Click Search button
- Status message: "Searching..."
- Search button becomes disabled
- Backend CLI is executed
Since the backend doesn't output JSON yet, you'll see:
- Either an error message (if backend output isn't JSON)
- Or empty results (if backend output is empty)
- Check the Debug Console for backend stderr/stdout
This is expected - the UI is complete, but backend JSON output is pending.
- ✅ Multi-line textarea
- ✅ Placeholder text visible
- ✅ Help text displays
- ✅ Ctrl+Enter to search (in textarea)
- ✅ Match case checkbox (checked by default)
- ✅ Whole word checkbox
- ✅ Shows "0 matches" initially
- ✅ Empty state with search icon
- ✅ Scrollable container
- ✅ Search button has icon
- ✅ Disabled during search
- ✅ Clear button resets form
Switch VS Code themes to verify styling:
- Ctrl+K Ctrl+T to open theme picker
- Try:
- Dark+ (default dark)
- Light+ (default light)
- Any other theme
- Colors adapt to theme
- Input fields use theme colors
- Buttons use VS Code button colors
- Text remains readable
Open Debug Console in the main VS Code window:
- View → Debug Console
- Look for:
- "Sharp Code Search extension is now active"
- "Sharp Code Search: All commands registered successfully"
- Warning if backend not found (expected in dev)
Try these error scenarios:
- Leave pattern empty
- Click Search
- Should show: "Please enter a search pattern" error
- Enter:
$incomplete - Click Search
- Should show: "Invalid pattern syntax" error
- Close all folders (File → Close Folder)
- Open Command Palette
- Commands should still appear
- Running search should show workspace error
Once the backend outputs JSON, test:
[
{
"file": "path/to/file.cs",
"line": 10,
"column": 5,
"code": "obj.ToString()",
"matchedText": "obj.ToString()",
"placeholders": {
"obj": "myObject"
}
}
]- Results should appear in list
- Each result shows:
- File path (clickable)
- Line and column
- Code preview
- Results count updates: "X matches"
- Click on a result item
- Should:
- Highlight the selected result
- Open the file in editor
- Jump to the line/column
- Show details panel
- Click a result
- Details panel appears on right
- Shows:
- File path
- Location (line/column)
- Matched code
- Placeholder values (if any)
- Close button (×) hides panel
- Search panel opens in sidebar/editor ✅
- Pattern input works ✅
- Search button executes backend ✅
- Clear button resets form ✅
- Commands appear in palette ✅
- Theme support working ✅
- Error messages display ✅
- Loading state shows ✅
- Results display in list
- Can navigate to results
- Details panel shows match info
- Result highlighting works
- Check Debug Console for errors
- Verify
out/folder exists:src/extension/out/ - Run:
npm run compileinsrc/extension/
- Expected in development
- Backend path:
src/backend/bin/Debug/net10.0/SharpCodeSearch.exe - Build backend:
dotnet buildinsrc/backend/
- Check for console errors
- Verify files exist:
src/extension/webview/search.htmlsrc/extension/webview/search.csssrc/extension/webview/search.js
- Open Debug Console
- Look for backend execution errors
- Verify workspace folder is open
- Check backend is built
- Hard refresh webview: Close panel and reopen
- Check browser dev tools: Ctrl+Shift+I (when webview focused)
- Verify CSS file loaded (check Network tab)
After Phase 1.4 testing:
-
Enhance Backend CLI (Phase 1.5):
- Add JSON output format
- Implement actual pattern matching
- Return proper result objects
-
Integration Testing:
- Test full search workflow
- Verify result navigation
- Test on real C# projects
-
Document Findings:
- Note any bugs
- Performance observations
- UX improvements needed
Phase 1.4 Status: ✅ Implementation Complete, Ready for Testing
Next Phase: 1.5 Integration Testing & Completion