Files
bun.sh/test/cli
Claude Bot 18ff16dcc7 Add BUN_WATCHER_TRACE environment variable for debugging file watcher events
Implements BUN_WATCHER_TRACE env var that logs all file watcher events to a file in JSON format. When set, the watcher appends detailed event information including timestamp, file path, and operation flags (write, delete, rename, metadata, move_to) plus any changed filenames.

The trace file is opened once during watcher initialization in append mode, allowing events to persist across multiple runs of bun --watch or bun --hot. This is useful for debugging watch-related issues.

Example usage:
  BUN_WATCHER_TRACE=/tmp/watch.log bun --watch script.js

Each line in the trace file is a JSON object with:
- timestamp: millisecond timestamp
- index: watch item index
- path: absolute file path being watched
- delete/write/rename/metadata/move_to: boolean operation flags
- changed_files: array of filenames that changed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 15:23:22 +00:00
..
2025-05-24 13:36:51 -07:00
2025-10-11 08:23:25 -07:00