{"id":16101465,"url":"https://github.com/mendhak/webstorm-dockercompose-cluster-debug","last_synced_at":"2025-04-06T00:27:38.811Z","repository":{"id":141195872,"uuid":"116261347","full_name":"mendhak/webstorm-dockercompose-cluster-debug","owner":"mendhak","description":"Attempting to attach webstorm's debugger to an express app, which uses Node's cluster, running via docker compose","archived":false,"fork":false,"pushed_at":"2018-01-04T16:21:16.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T06:38:44.503Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mendhak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-04T13:09:13.000Z","updated_at":"2023-09-08T17:34:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"a009b5a4-f2fd-4865-9db2-9a79681609f4","html_url":"https://github.com/mendhak/webstorm-dockercompose-cluster-debug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendhak%2Fwebstorm-dockercompose-cluster-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendhak%2Fwebstorm-dockercompose-cluster-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendhak%2Fwebstorm-dockercompose-cluster-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mendhak%2Fwebstorm-dockercompose-cluster-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mendhak","download_url":"https://codeload.github.com/mendhak/webstorm-dockercompose-cluster-debug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419640,"owners_count":20936009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T18:50:02.017Z","updated_at":"2025-04-06T00:27:38.795Z","avatar_url":"https://github.com/mendhak.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Steps\n\nAttempting to attach webstorm's debugger to an express app, which uses Node's cluster, running via docker compose\n\n1. git clone https://github.com/mendhak/webstorm-dockercompose-cluster-debug.git\n2. Open that project in WebStorm, run `npm install`\n3. Ensure there's a breakpoint in routes/index.js [on line 6](https://github.com/mendhak/webstorm-dockercompose-cluster-debug/blob/master/routes/index.js#L6).\n4. Look at the bin/www file and notice how the cluster.fork() is being created. One [child for each CPU core](https://github.com/mendhak/webstorm-dockercompose-cluster-debug/blob/master/bin/www#L22-L24).\n5. In terminal, run `sudo docker-compose up` - you should see the container come up, and start listening.\n6. Then from the debug configurations choose to run 'dc-attach' - it attaches to port 5858\n\n## Problem\n\nNow - browse to http://localhost:3000 and the breakpoint does not get hit. This is probably because the actual work is now done in the children, listening on ports 5859, 5860, 5861, 5862.\n\n## Question \n\nHow to get WebStorm's debugger to recognize this forking and attach itself to the right places? \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendhak%2Fwebstorm-dockercompose-cluster-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmendhak%2Fwebstorm-dockercompose-cluster-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmendhak%2Fwebstorm-dockercompose-cluster-debug/lists"}