-
Notifications
You must be signed in to change notification settings - Fork 4k
[WIP] Add make debug to improve debugging capabilities of coding agents
#13721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Enable browser console logs to be piped to the dev server terminal with TERMINAL_CONSOLE=1 make frontend-dev. This allows coding agents to read and debug browser console output from terminal logs. Co-Authored-By: Claude <noreply@anthropic.com>
✅ PR preview is ready!
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds vite-plugin-terminal as an optional development debugging tool that pipes browser console logs to the terminal output. This feature is designed to help coding agents (AI assistants) debug frontend code by making browser console output directly accessible in terminal logs.
Changes:
- Added
vite-plugin-terminal@^1.4.0as a dev dependency - Configured the plugin to activate only during dev server mode when
TERMINAL_CONSOLE=1environment variable is set - Updated yarn.lock with the new package and its transitive dependencies
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| frontend/app/package.json | Added vite-plugin-terminal as a devDependency at version ^1.4.0 |
| frontend/app/vite.config.ts | Imported the plugin and conditionally enabled it only during dev server when TERMINAL_CONSOLE env var is set |
| frontend/yarn.lock | Added lockfile entries for vite-plugin-terminal and its dependencies (@polka/url, @rollup/plugin-strip, sirv, mrmime, totalist, updated ufo and kolorist versions) |
Adds a new make target that starts both Streamlit and Vite dev server with console logging enabled. Usage: `make debug my-script.py` Co-Authored-By: Claude <noreply@anthropic.com>
- Write logs to .debug/backend.log and .debug/frontend.log - Logs persist after exit for post-mortem analysis - Check if ports 3000/8501 are available before starting - Show helpful error with PIDs if ports are in use - Document debug command in AGENTS.md Co-Authored-By: Claude <noreply@anthropic.com>
Rename log files to debug-backend.log and debug-frontend.log in the existing work-tmp/ directory. Co-Authored-By: Claude <noreply@anthropic.com>
make debug to improve debugging capabilities of coding agents
- Start servers in background and poll health endpoints until ready - Add streamlit flags for headless mode, runOnSave, and developmentMode - Move cleanup trap before server startup for proper signal handling - Use `wait` to keep process running until Ctrl+C Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Describe your changes
Added
vite-plugin-terminalplugin to the Vite dev server config, which pipes browser console logs to the terminal. This is useful for debugging since coding agents can read terminal output directly.The plugin is opt-in and only activates during dev server when
TERMINAL_CONSOLE=1 make frontend-devis run.Testing Plan
TERMINAL_CONSOLE=1 make frontend-devand verifyconsole.log()calls appear in terminalContribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.