Skip to content

Cannot connect to runtime process, ECONNREFUSED #1

Description

@eddyekofo94

I know this was done over a year ago from now, but the debug settings gives the
Cannot connect to runtime process, ECONNREFUSED error on my machine.

After very long time googling around here's the settings that worked on my machine which you might need to update. 🙂

package.json

"scripts": {
   "start": "node --inspect -r ts-node/register src/server.ts",
   "dev": "./node_modules/nodemon/bin/nodemon.js",
   "test": "jest",
   "test:watch": "jest --watch"
 }

nodemon.json

{
    "ignore": ["**/*.test.ts", "**/*.spec.ts", ".git", "node_modules"],
    "watch": ["src"],
    "exec": "npm start",
    "ext": "ts, gql",
    "inspect": true,
    "events": {
        "restart": "echo \"[Warning] Remember run npm run test b4 push to dev branch !\""
    }
}

launch.json

{
 "version": "0.2.0",
    "configurations": [{
        "type": "node",
        "request": "attach",
        "name": "Attach to Process",
        "port": 9229,
        "restart": true,
        "protocol": "inspector",
        // "processId": "${command:PickProcess}",
        "address": "localhost"
    }]
}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions