Great article. Just an update: as of serverless 1.40.0 and VS Code 1.32.3, you need to set "autoAttachChildProcesses": true in your launch.json for the debugger to work correctly.

Also a trick that I found useful is to put every function in a file with the same name (directory structure doesn’t matter), then use "-f", "${fileBasenameNoExtention}" in the args instead of "-f", "hello" . This way you can just open the file you want to debug in a tab and press F5 and debug it instead of hard coding the function name in launch.json or making one launch configuration for every function.

Written by

Knowledge Worker, MSc Systems Engineering, Tech Lead, Web Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store