Coder Social home page Coder Social logo

Comments (6)

stevejhiggs avatar stevejhiggs commented on August 16, 2024

Thanks marc. I'll add some images to the readme but to help you for now:

Go to the debug tab in visual studio
at the top where it says "debug" and probably "no configurations" there should be a gear icon. Click it and you should be taken to your launch.json file that will look something like:

"version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Launch Program",
            "program": "${workspaceRoot}\\index.js",
            "outFiles": [
                "${workspaceRoot}/out/**/*.js"
            ]
        }
    ]

add the line "protocol": "inspector", to this so we end up with something like:

{
    // Use IntelliSense to learn about possible Node.js debug attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "protocol": "inspector",
            "name": "Launch Program",
            "program": "${workspaceRoot}\\index.js",
            "outFiles": [
                "${workspaceRoot}/out/**/*.js"
            ]
        }
    ]
}

Then you should be able to debug as normal. Also if you use node version 8 or greater it will default to this and the above will be not needed.

Thanks
Steve

from aws-lambda-typescript.

marc-cardona avatar marc-cardona commented on August 16, 2024

Steve, Thank you very much for your quick reply.

Still having troubles debugging. I have changed my "launch.json" and I am always getting the following error:

captura de pantalla 2017-06-15 a las 20 44 17

I have been trying to update my node version to 8.1.2 but I'm still receiving the same "Unexpected token export" error.

Do you know where might be the problem?

Thank you again
Marc

from aws-lambda-typescript.

stevejhiggs avatar stevejhiggs commented on August 16, 2024

Hi marc, I'll take a look at it when I get some time this weekend (I've a 1 year old daughter and that means I only get a few hours here or there). I'm about to do a significant update and I'll give better examples

from aws-lambda-typescript.

marc-cardona avatar marc-cardona commented on August 16, 2024

Ok Steve, thanks for your patience ;)
I look forward to the next update.

from aws-lambda-typescript.

stevejhiggs avatar stevejhiggs commented on August 16, 2024

Hi marc, if you update to latest then any newly init'd functions should be fine.

To fix an already existing function:

from aws-lambda-typescript.

marc-cardona avatar marc-cardona commented on August 16, 2024

Thank you Steve, everything working.
Marc

from aws-lambda-typescript.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.