Debugging experience #56011
Unanswered
thoughtsunificator
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Start the debugging client as soon as a debugger statement is met.
Information about the debugging protocols should be abstracted, which for the most part is not the case since we need to know that there is a server and a client, why should the developer cares? How should they be abstracted? Well we can start with the fact we currently need to ask twice for the debugger to start, one with the debugger statement and two by using the debug command and in some cases you even have to add the inspect command to the equation, that's a hell lot more than just running your program and expecting the runtime to do what you asked by using the debugger statement which is... Start the debugger.
I propose that either a new env is added or we use
NODE_ENV
which seems like a pretty good use of it. When set, ANY script shall be debuggable either using the internal debugger client (CLI) or simply by providing the server depending on the execution context.If that's the case, then:
node foo.js
npm run foo
npm test
All of these will work as is and be easily debuggable with no additional effort required (other than using the debugger statement) on the developer part.
Beta Was this translation helpful? Give feedback.
All reactions