# Debug serverless python lambda locally using the VsCode debugger

**URL:** <https://forum.serverless.com/t/debug-serverless-python-lambda-locally-using-the-vscode-debugger/17329>\
**Category:** Serverless Framework\
**Tags:** lambda\
**Created:** [June 17, 2022, 10:28am UTC](https://forum.serverless.com/t/debug-serverless-python-lambda-locally-using-the-vscode-debugger/17329 "2022-06-17T10:28:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WilhelmStein](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/wilhelmstein/32/6918_2.png) [@WilhelmStein](https://forum.serverless.com/u/WilhelmStein)\
**Post date:** [June 17, 2022, 10:28am UTC](https://forum.serverless.com/t/debug-serverless-python-lambda-locally-using-the-vscode-debugger/17329/1 "2022-06-17T10:28:24Z")

</div>

Is there some way to debug a serverless python lambda locally using `sls invoke local` and have the vscode debugger actually attach to the invoked python process so that I can use breakpoints and the debugger functionality? So far I’ve tried making the following `launch.json` file:

```auto
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Run lambda",
      "runtimeExecutable": "/home/phii/.nvm/versions/node/v16.14.2/bin/node",
      "type": "node",
      "request": "launch",
      "program": "${workspaceFolder}/node_modules/.bin/sls",
      "args": ["invoke", "local", "-f", "main", "--data", "{}"],
      "console": "integratedTerminal"
    }
  ]
}

```

Sadly, the vscode breakpoints I set inside my handler become gray and the interface declares them as “unbound”.
