Comments (6)
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.
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:
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.
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.
Ok Steve, thanks for your patience ;)
I look forward to the next update.
from aws-lambda-typescript.
Hi marc, if you update to latest then any newly init'd functions should be fine.
To fix an already existing function:
- overwrite your tsconfig and tslint files with the ones in https://github.com/stevejhiggs/aws-lambda-typescript/tree/master/templates.
- Update the index.ts to follow the one in https://github.com/stevejhiggs/aws-lambda-typescript/tree/master/templates as there are some changes in the imports and returns.
from aws-lambda-typescript.
Thank you Steve, everything working.
Marc
from aws-lambda-typescript.
Related Issues (17)
- Error with generated lambda handler HOT 4
- aws-sdk calls don't work HOT 5
- Lambda Environment Variables Broken HOT 3
- DynamoDB Document API in TypeScript HOT 1
- Lambda handler function name is mangled by Webpack+UglifyJS when doing a release build HOT 3
- MySQL doesn't work HOT 3
- gulp lambda:run / package runtime error HOT 4
- Please update dependencies HOT 1
- gulp lambda:init doesn't work HOT 2
- Cannot find module HOT 1
- Compile failure causes bad deployment HOT 1
- Doesn't work with Gulp 4 HOT 2
- How to disable ignorable TS errors for a line? HOT 2
- Copy .npmrc during deploy HOT 3
- Lambda deploy generates errors now HOT 4
- 'gulp lambda:init' fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-lambda-typescript.