You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debugging an app running on bankai (or bankai itself, for that matter) with just console.log isn't the most ergonomic experience and the debug option wasn't doing anything anyway (one has to set the DEBUG env variable to enable logs).
This adds the debug option which signals node to start listening for debuggers, optionally on a specific port. Though the port option isn't working for me, supposedly this is how it's intended to work (https://nodejs.org/api/process.html#process_process_debugport).
@s3ththompson does --inspect-brk make sense from a user perspective though? Seeing as it'd break in bankai source code, not in the app I am working on. We probably could inject a debug statement into the first line of the entry file but that'd be borderline dark arts.
I use --inspect-brk to give myself time to open a dedicated Node window from chrome://inspect when I have a debug statement in my code but the code might exit before I can get the window open (when debugging a CLI like Bankai for example, rather than a server that's continuously responding to requests). Once I'm connected I just start execution again. Maybe this is a distinction between debugging bankai build and bankai start...
I hear you. When using bankai start I usually just resave a file after attaching a debugger to trigger a new build. That wouldn't work with bankai build. I'm not sure how we'd go about making that work though, as @goto-bus-stop pointed out, the process is already running.
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
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.
This is a 🙋 feature
Checklist
Context
Debugging an app running on bankai (or bankai itself, for that matter) with just
console.logisn't the most ergonomic experience and thedebugoption wasn't doing anything anyway (one has to set theDEBUGenv variable to enable logs).This adds the
debugoption which signals node to start listening for debuggers, optionally on a specific port. Though the port option isn't working for me, supposedly this is how it's intended to work (https://nodejs.org/api/process.html#process_process_debugport).Semver Changes
Minor
Closes #441