Window Search
A VS Code extension for analyzing log files by searching for time windows marked by begin and end strings.
Features
- Time Window Search: Find and pair begin/end markers in log files
- FIFO/LIFO Algorithms: Choose between First-In-First-Out or Last-In-First-Out pairing strategies
- Interactive Results: Click to navigate to lines, right-click to open pairs in new tabs
- Unpaired Marker Detection: Identifies begin/end markers that couldn't be paired
- Sidebar Panel: Dedicated panel in the activity bar for easy access
- Log Filtering: Remove matching or non-matching lines directly from the editor via context menu
Usage
- Open a log file in VS Code
- Click the Window Search icon in the activity bar (sidebar)
- Enter your begin marker text (e.g.,
[REQUEST_START])
- Enter your end marker text (e.g.,
[REQUEST_END])
- Select the pairing algorithm (FIFO or LIFO)
- View the results showing paired windows and any unpaired markers
Pairing Algorithms
FIFO (First-In-First-Out): Each end marker is paired with the oldest unpaired begin marker that appears before it. This is useful for sequential, non-overlapping operations.
LIFO (Last-In-First-Out): Each end marker is paired with the most recent unpaired begin marker that appears before it. This is useful for nested operations or stack-like behavior.
Log Filtering
You can filter log files by selecting text and right-clicking to access context menu options:
- Remove all matching lines: Deletes all lines containing the selected text. Useful for removing noise or specific log types.
- Remove all but matching lines: Deletes all lines that don't contain the selected text. Useful for isolating specific log entries.
These operations modify the current file in the editor, allowing you to quickly clean up logs for analysis.
Example
Using the sample log file in test-logs/sample.log:
- Begin marker:
[TASK_BEGIN]
- End marker:
[TASK_END]
- Algorithm: LIFO
This will pair nested task windows correctly, showing which tasks completed in the expected order.
Development
Building
npm install
npm run compile
Running
- Open this folder in VS Code
- Press F5 to start debugging
- A new Extension Development Host window will open
- Open a log file and use the Window Search panel
Testing
Open the test-logs/sample.log file to test the extension with various marker combinations:
[REQUEST_START] / [REQUEST_END]
[TASK_BEGIN] / [TASK_END]
Requirements
Extension Settings
This extension does not add any VS Code settings.
Known Issues
None at this time.
Release Notes
0.1.0
Added log filtering capabilities:
- Remove all matching lines via editor context menu
- Remove all but matching lines via editor context menu
- Line removal operations work on selected text
0.0.1
Initial release of Window Search with:
- FIFO and LIFO pairing algorithms
- Sidebar panel interface
- Line navigation
- Open pair in new tab functionality