Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support node debug mode #14

Open
mikaelhm opened this issue May 8, 2014 · 6 comments
Open

Support node debug mode #14

mikaelhm opened this issue May 8, 2014 · 6 comments

Comments

@mikaelhm
Copy link
Contributor

mikaelhm commented May 8, 2014

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

@mikaelhm
Copy link
Contributor Author

mikaelhm commented May 8, 2014

I know this could be done with the method mentioned in #15

But I think it would be nice to support it directly.

@JonAbrams
Copy link
Owner

👍

@JonAbrams
Copy link
Owner

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.

@mikaelhm
Copy link
Contributor Author

mikaelhm commented May 8, 2014

Yeah, you're right.

The only way is probably to spawn a new process using child_process.

@JonAbrams
Copy link
Owner

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.

@mikaelhm
Copy link
Contributor Author

mikaelhm commented May 8, 2014

Thats a good alternative. Personally I think i am more to the flag/parameter version. Even though thats gonna leave us with two processes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants