synth
synth copied to clipboard
Support node debug mode
It would be great if the synth cli supported the node debug flags like so:
synth s --debug
and
synth s --debug-brk
So I can debug using e.g. node-inspector
I know this could be done with the method mentioned in https://github.com/JonAbrams/synth/issues/15
But I think it would be nice to support it directly.
:+1:
I can imagine one roadblock to enabling this is that fact that the synth command is already invoked by node by the time it can read the debug flag, and so far, it looks like node needs to be started in debug mode, it can't be turned on afterwards.
I suppose a workaround is for synth to recall itself using node passing in the debug command.
Yeah, you're right.
The only way is probably to spawn a new process using child_process.
Maybe another way would be to offer an alternate "binary" called synth-debug that has #!/usr/bin/env node debug as its first line and then invokes a common module that they both use.
Thats a good alternative. Personally I think i am more to the flag/parameter version. Even though thats gonna leave us with two processes.