Skip to content

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

Open
decrypto21 wants to merge 4 commits into
mainfrom
nidish/make-debugger
Open

chore(make): add a debugger target that builds the host in dev mode#604
decrypto21 wants to merge 4 commits 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 reach it, with nothing to enable by hand.

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 never dials, the board stays empty, and nothing reports why.

How: Makefile builds the dotli host in dev mode and runs the debugger, the host preview and the playground together. create-worker-host-runtime.ts lets that build's dial URL reach the host, so the dial URL now has two sources: a localStorage key as before, and a value the dev build carries in VITE_TRUAPI_DEBUGGER. Both sit inside the same DEV gate, so a production bundle still resolves neither.

  • A key set by hand wins, so the build's value is a default rather than an override, and the host reports which source it used.
  • DEBUGGER_PORT moves the server port and the baked-in URL together. Moving one alone leaves the host dialling a dead port, which presents as a broken debugger.
  • The debugger runs from the workspace, so nothing here waits on @parity/truapi-debugger being published.

Verified with no key set. Against dot.li main, which carries no seeding of its own, a fresh browser profile with empty localStorage reports wire debugger: dialling ws://127.0.0.1:9231 from the build. 92 @parity/truapi-host tests pass. The printed block, truapi-host's README and §9 of the design doc are updated to describe both sources.

Not exercised from a pristine clone: dev-bootstrap runs git submodule update, which aborts while the dotli submodule carries local work.

@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