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

fix: cannot debug child forked process #1188

Merged
merged 1 commit into from
Oct 11, 2018
Merged

fix: cannot debug child forked process #1188

merged 1 commit into from
Oct 11, 2018

Conversation

ulivz
Copy link
Contributor

@ulivz ulivz commented Oct 2, 2018

Summary

Since all umi instance are spawned via child_process.fork, but execArgv will be default to process.execArgv, causing the parent and child process used the same inspecting port, which takes following error:

Starting inspector on 127.0.0.1:9229 failed: address already in use

This PR doesn't introduced the mechanism of checking the usage of port like node-portfinder, it just ensures:

  1. Parent and child process won't share the same inspecting port;
  2. Multiple child processes won't share the same inspecting port.

Refs:

@ulivz
Copy link
Contributor Author

ulivz commented Oct 8, 2018

@sorrycc

Could you help me to take a look, it blocked me to debug when I re-install all packages and I need to change the code manually each time. Thanks.

@sorrycc sorrycc merged commit 69ff575 into umijs:master Oct 11, 2018
@sorrycc
Copy link
Member

sorrycc commented Oct 11, 2018

Thanks for PR!

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

Successfully merging this pull request may close these issues.

2 participants