chore(make): add a debugger target that builds the host in dev mode - #604
Open
decrypto21 wants to merge 1 commit into
Open
chore(make): add a debugger target that builds the host in dev mode#604decrypto21 wants to merge 1 commit into
decrypto21 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
make debuggertarget that starts the wire debugger against a host that can actually reach it.Why:
make devcannot drive the debugger. dotli ships onlybuildandpreview, both production builds, and the dial sits behindimport.meta.env.DEV, which a production bundle replaces withfalse. The host then never dials, the board stays empty, and nothing reports why. Getting frames today means knowing to setNODE_ENV=developmentby hand, which appears in no target and no README.How:
Makefilebuilds the dotli host in dev mode, then runs the debugger, the host preview and the playground together.NODE_ENV=developmentso the dial survives into the bundle.apps/host/distthroughscripts/preview-server.tsdirectly rather than dotli'spreview:debug, which wouldturbo run buildagain in production and undo the dev build.bun run src/server.ts), so nothing depends on@parity/truapi-debuggerbeing published: inside the monorepo@parity/truapiresolves to the workspace copy, which carries the./wire-decodeentry point the decoder needs.localStorageline, 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_PORToverrides the default 9231.The
localStoragestep 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.