remix icon indicating copy to clipboard operation
remix copied to clipboard

feat(remix-dev/cli): add --debug-binding option

Open jstafman opened this issue 3 years ago • 3 comments

Closes: #

  • [x] Docs
  • [x] Tests

My preference would be to make --debug accept an optional value as described here: https://github.com/remix-run/remix/issues/4216#issuecomment-1253134476. However, I was not able to figure how to make that work. I've tried making it a string instead of boolean, but it is rejected when no value is provided. I also tried creating a custom handler, with the same result. If anyone has a suggestion on how to approach that, please let me know. There is currently an open issue about this for the arg package: https://github.com/vercel/arg/issues/61#issue-1191180455.

Testing Strategy:

  • Tested out different combinations of using the --debug-binding flag using a playground, including:
    • remix dev --debug (default)
    • remix dev --debug --debug-binding 0:0:0:0:9229
    • remix dev --debug --debug-binding 0:0:0:0
    • remix dev --debug-binding 0:0:0:0:9229 (shouldn't load debug at all)
  • Ran yarn test and all tests passed

jstafman avatar Oct 05 '22 00:10 jstafman

⚠️ No Changeset found

Latest commit: 1704f353c9aa0db971abce91413a42742bbbca8f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Oct 05 '22 00:10 changeset-bot[bot]

@jstafman can you rebased & fix the conflict? 🙏🏼

machour avatar Jan 22 '23 19:01 machour

@jstafman can you rebased & fix the conflict? 🙏🏼

@machour - All set.

jstafman avatar Jan 22 '23 23:01 jstafman

Hi @jstafman!

Are you still interested in getting this one merged?

If so, please rebase onto latest dev & resolve conflicts

MichaelDeBoey avatar May 01 '23 23:05 MichaelDeBoey

Hi @jstafman!

Are you still interested in getting this one merged?

If so, please rebase onto latest dev & resolve conflicts

@MichaelDeBoey - It looks like a lot has changed since I first created this pull request. It might be easier for me to start with the current dev branch and redo my work from there (it wasn't a lot). Do you think this is something worth pursuing?

jstafman avatar May 02 '23 23:05 jstafman

The new dev server (unstable_dev) runs alongside your app server. So if you wanted to add debugging to your app server, you can now do so directly without modifying the dev server.

Since we are actively pushing towards v2 right now and will be removing the old dev server flow, might be best to try this with the new dev server and only proceed if there are issues with that.

pcattori avatar May 03 '23 01:05 pcattori

The new v2 dev server is now stabilized. With v2_dev enabled, you can call node directly for your server and pass in any flags without indirection.

pcattori avatar Jul 05 '23 18:07 pcattori