I've searched throughout google about this question and I had no success...
I want to work on a serverless plugin fix, but I don't know how to attach the process to debug the code. Currently, I'm using vscode and the plugin was developed using nodejs + typescript.
Does anyone have any tip or article explaining how to do that?
As every other process, that you want to debug, you need to run it and somehow connect the debugger to it.
You need to remember, that Serverless Framework is written in JS/TS, so it runs in Node.js. So you can debug it quite easily, if you are developing your Lambdas in Node.js, as it's quite common environment.
node_modules
directory and find the source code of the plugin, that you want to debug.4. Make sure you've chosen the correct package.json
!
In my example I'm using package
script from package.json, but it could be also any other script, that triggers serverless deploy
or serverless print
in the end.
And that's it! Breakpoints should be triggered normally, like when you debug your own JS code.