Skip to content

chore(make): add a debugger target that builds the host in dev mode - #604

Open
decrypto21 wants to merge 1 commit into
mainfrom
nidish/make-debugger
Open

chore(make): add a debugger target that builds the host in dev mode#604
decrypto21 wants to merge 1 commit into
mainfrom
nidish/make-debugger

Conversation

@decrypto21

@decrypto21 decrypto21 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Adds a make debugger target that starts the wire debugger against a host that can actually reach it.

Why: make dev cannot drive the debugger. dotli ships only build and preview, both production builds, and the dial sits behind import.meta.env.DEV, which a production bundle replaces with false. The host then never dials, the board stays empty, and nothing reports why. Getting frames today means knowing to set NODE_ENV=development by hand, which appears in no target and no README.

How: Makefile builds the dotli host in dev mode, then runs the debugger, the host preview and the playground together.

  • Builds with NODE_ENV=development so the dial survives into the bundle.
  • Serves apps/host/dist through scripts/preview-server.ts directly rather than dotli's preview:debug, which would turbo run build again in production and undo the dev build.
  • Runs the debugger from the workspace (bun run src/server.ts), so nothing depends on @parity/truapi-debugger being published: inside the monorepo @parity/truapi resolves to the workspace copy, which carries the ./wire-decode entry point the decoder needs.
  • Prints the debugger URL, the host URL, and the one-time localStorage line, naming the origin it has to be set on. That key is per-origin and per browser profile, so a value set anywhere else is invisible and the host stays silent by design.
  • DEBUGGER_PORT overrides the default 9231.

The localStorage step is still manual because the dotli pin on main predates the build-time dial seeding. When that pin moves the target can pass the URL at build time and the step goes away.

@decrypto21
decrypto21 requested a review from a team September 4, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant