Replies: 4 comments 1 reply
-
Here is serverless.yaml file. org: ericjung
app: aws-node-http-api-project
service: aws-node-http-api-project
frameworkVersion: '3'
provider:
name: aws
runtime: nodejs14.x
functions:
hello:
handler: handler.hello
events:
- httpApi:
path: /
method: get
plugins:
- serverless-offline
- serverless-plugin-typescript
custom:
serverless-offline:
resourceRoutes: true
Here is launch.json file in vscode setting. {
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Hello World",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceRoot}/node_modules/.bin/sls",
"args": [
"invoke",
"local",
"--function",
"hello",
"--data",
"{}",
]
}
]
} |
Beta Was this translation helpful? Give feedback.
-
your args in the launch config are running you might find additional ideas here: https://github.com/dherault/serverless-offline#debug-process |
Beta Was this translation helpful? Give feedback.
-
@dnalborczyk {
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug serverless app",
"program": "${workspaceFolder}/node_modules/serverless/bin/serverless",
"args": [
"offline",
"--httpPort",
"4001",
],
"runtimeExecutable": "node"
}
]
} org: ericjung
app: aws-node-http-api-project
service: aws-node-http-api-project
frameworkVersion: '3'
provider:
name: aws
runtime: nodejs14.x
functions:
hello:
handler: handler.hello
events:
- httpApi:
path: /hello
method: get
plugins:
- serverless-offline
- serverless-plugin-typescript
custom:
serverless-offline:
httpPort: 3005
|
Beta Was this translation helpful? Give feedback.
-
I success debugging in TypeScript.
|
Beta Was this translation helpful? Give feedback.
-
I learned debugging in JavaScript.
But i failed debugging in TypeScript.
Show me debugging solution in TypeScript.
Beta Was this translation helpful? Give feedback.
All reactions