Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Allow to run in TCP mode without cluster #78

Closed
felixfbecker opened this issue Feb 23, 2017 · 3 comments
Closed

Allow to run in TCP mode without cluster #78

felixfbecker opened this issue Feb 23, 2017 · 3 comments
Labels

Comments

@felixfbecker
Copy link
Contributor

Every worker runs in a separate process so it's hard to attach a debugger.
TCP and cluster code should not be in the same file.

@beyang
Copy link
Member

beyang commented Feb 23, 2017

Could you just forward the --debug flag, if set, to child process in some way? In the original cluster implementation, it was still possible to use the browser-based JS debugger by passing the associated debugger port of the subprocess. When testing in dev, I would limit the number of workers to 1 (in this case 2) to ensure I would always attach to an active worker.

@felixfbecker
Copy link
Contributor Author

I do - but every worker has it's own port, so you first need to start the master, then copy+paste the logged port and attach to that. It would be far easier if I could just F5 to launch a single worker

@beyang
Copy link
Member

beyang commented Feb 23, 2017

I see. The other thing you could do is limit the number of workers to 1, so that there is just one worker receiving all request. That way it should always expose its debugger on the same port.

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

No branches or pull requests

2 participants