moleculerjs / moleculer-template-project-typescript

Typescript project template for Moleculer microservices framework.
MIT License
125 stars 45 forks source link

VsCode Debugging #49

Closed sskhokhar closed 1 year ago

sskhokhar commented 3 years ago

The debug process is not working with this template. Im using this project in lerna workspace but its not working Can you please add a sample launch.json file?

Here is my current launch config.

      "type": "node",
      "request": "launch",
      "name": "Launc",
      "program": "${workspaceRoot}/node_modules/moleculer/bin/moleculer-runner.js",
      "args": [
        "${workspaceRoot}/packages/backend/services/**/**/*.service.ts",
        "--env"
      ],
      "sourceMaps": true,
      "trace": "all",
      "env": {
        "PORT": "3000"
      },
      "preLaunchTask": "npm: build - packages/backend",
      "cwd": "${workspaceRoot}",
      "outFiles": ["${workspaceRoot}/packages/backend/dist/**/**/*.js"]
    }

Here is my task file

    "version": "2.0.0",
    "tasks": [
        {
            "type": "npm",
            "script": "build",
            "path": "packages/backend/",
            "group": "build",
            "problemMatcher": [],
            "label": "npm: build - packages/backend",
            "detail": "tsc --build tsconfig.json && cp .env ./dist/.env "
        }
    ]
}