Skip to content

unable to debug in vscode #24

Open

Description

@cs-a50494

It would be nice to have a setup for debugging in vscode.

Activity

  1. yxd-hde commented on Dec 14, 2017

    @yxd-hde
    Contributor

    PR is welcomed.

  2. mark-bixler commented on Nov 1, 2018

    @mark-bixler

    Did anyone ever get this figured out? I had it on Mac, but can't get debugging working on Windows :(

  3. maxmonterumisi commented on Dec 12, 2018

    @maxmonterumisi

    Can someone help me configure python-lambda-local under VSC (Windows 10) please ?

  4. emepetres commented on Feb 16, 2019

    @emepetres

    By using pytest, I'm able to debug it out of the box, without any specific configuration. Just set a break point, and execute the test within vscode.

    Probably with unittests or nosetests will work as well: https://code.visualstudio.com/docs/python/unit-testing#_enable-a-test-framework

  5. ggaller commented on May 15, 2023

    @ggaller

    This is working VS Code debug configuration for launch.json:

    {
        "name": "Lambda: My Lambda",
        "type": "python",
        "request": "launch",
        "module": "lambda_local",
        "args": [
                  "-l", "${workspaceFolder}/.venv/lib",
                  "-f", "lambda_handler",
                  "-t", "180",
                  "-e", "${workspaceFolder}/env.json",
                  "${workspaceFolder}/lambda_function.py",
                  "${workspaceFolder}/events/event.json"
        ],
        "console": "internalConsole",
        "internalConsoleOptions": "openOnSessionStart",
        "env": {
            "AWS_PROFILE": "some-profile",
            "AWS_DEFAULT_REGION": "eu-central-1"
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions