Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ classifiers = [
dependencies = [
"click>=8.1",
"debugpy>=1.8",
"fastapi>=0.100",
"uvicorn>=0.20",
]

[project.optional-dependencies]
Expand Down
19 changes: 19 additions & 0 deletions src/cc_debugger/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@
from cc_debugger.commands.time_travel import goto, step_back, step_forward
from cc_debugger.commands.watch import watch

# Web UI
from cc_debugger import web_ui_server


@click.command("web")
def web_ui() -> None:
"""Launch the web dashboard (opens in browser)."""
try:
import webbrowser
import uvicorn
webbrowser.open("http://127.0.0.1:8080")
uvicorn.run(web_ui_server.app, host="127.0.0.1", port=8080)
except Exception as e:
click.echo(f"Error: {e}", err=True)
raise SystemExit(1)


@click.group()
@click.version_option(package_name="cc-debugger")
Expand Down Expand Up @@ -74,6 +90,9 @@ def main() -> None:
# Post-mortem
main.add_command(pm)

# Web UI
main.add_command(web_ui)


if __name__ == "__main__":
main()
Empty file.
Loading