-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #365 from franciscocpg/vscode-debug
Vscode debug
- Loading branch information
Showing
6 changed files
with
1,312 additions
and
5,484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
// Use IntelliSense to learn about possible 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", | ||
"name": "Launch Serverless Offline", | ||
"program": "${workspaceRoot}/node_modules/serverless/bin/serverless", | ||
"args": [ "offline", "--noTimeout", "--dontPrintOutput", "--stage=dev" ], | ||
"sourceMaps": true, | ||
"runtimeArgs": [ | ||
"--lazy" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/.webpack/**/*.js" | ||
], | ||
"protocol": "inspector", | ||
"runtimeExecutable": "node", | ||
"env": { | ||
// Here we set some environment vars that should be set locally. | ||
// They can and will overwrite the ones coming from your serverless.yml | ||
}, | ||
"windows": { | ||
"program": "${workspaceRoot}\\node_modules\\serverless\\bin\\serverless", | ||
} | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Invoke Local - first function", | ||
"program": "${workspaceRoot}/node_modules/serverless/bin/serverless", | ||
"args": [ "invoke", "local", "-f", "first", "--data", "{}" ], | ||
"sourceMaps": true, | ||
"runtimeArgs": [ | ||
"--lazy" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/.webpack/**/*.js" | ||
], | ||
"protocol": "inspector", | ||
"runtimeExecutable": "node", | ||
"env": { | ||
// Here we set some environment vars that should be set locally. | ||
// They can and will overwrite the ones coming from your serverless.yml | ||
}, | ||
"windows": { | ||
"program": "${workspaceRoot}\\node_modules\\serverless\\bin\\serverless", | ||
} | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Invoke Local - second function", | ||
"program": "${workspaceRoot}/node_modules/serverless/bin/serverless", | ||
"args": [ "invoke", "local", "-f", "second", "--data", "{}" ], | ||
"sourceMaps": true, | ||
"runtimeArgs": [ | ||
"--lazy" | ||
], | ||
"outFiles": [ | ||
"${workspaceFolder}/.webpack/**/*.js" | ||
], | ||
"protocol": "inspector", | ||
"runtimeExecutable": "node", | ||
"env": { | ||
// Here we set some environment vars that should be set locally. | ||
// They can and will overwrite the ones coming from your serverless.yml | ||
}, | ||
"windows": { | ||
"program": "${workspaceRoot}\\node_modules\\serverless\\bin\\serverless", | ||
} | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
This is the default babel webpack-4 example to look at, because only dynamic entry point resolution lets you use Serverless completely. Individual packaging with a per-function dependency optimization is only available with that approach. | ||
This is the default babel webpack-4 example to look at, because only dynamic | ||
entry point resolution lets you use Serverless completely. | ||
Individual packaging with a per-function dependency optimization is only | ||
available with that approach. | ||
|
||
You can also try to invoke a function locally: | ||
``` | ||
serverless invoke local --function=first --path=./event.json | ||
``` | ||
``` | ||
|
||
Also it has a [.vscode/launch.json](.vscode/launch.json) file for debugging the | ||
functions using `vscode`. |
Oops, something went wrong.