serverless-stack-demo-ext-api icon indicating copy to clipboard operation
serverless-stack-demo-ext-api copied to clipboard

How to debug services using vscode?

Open tomeraz opened this issue 5 years ago • 2 comments

Installed serverless-offline Trying to debug the services in vscode. The debugger runs the lambda but doesn't pause on break points inside lambda code. Any idea how to make it work?

Here's launch.json object:

    {
      "type": "node",
      "request": "launch",
      "name": "setupStreaming",
      "skipFiles": ["<node_internals>/**"],
      "program": "${workspaceRoot}/node_modules/.bin/sls",
      "cwd": "${workspaceFolder}/services/sessions",
      "stopOnEntry": true,
      "args": [
        "invoke",
        "local",
        "--function",
        "setupStreaming",
        "--stage",
        "dev",
        "--path",
        "./mocks/setupStreaming-event.mock.json"
      ]
    }

tomeraz avatar Jul 28 '20 15:07 tomeraz

Also tried to use sls --config and set the nested services/serviceName folder serverless.yml but any plugins it uses, it shows an error that the plugin is not found.

tomeraz avatar Jul 28 '20 17:07 tomeraz

Hmm I might need some help with this. I'm not a VSCode user.

jayair avatar Aug 17 '20 00:08 jayair