Function Runner helps you run and test functions you have written. The extension supports currently Javascript and Typescript but support to other languages can be added.
Running and Debugging a function with inputs
You can execute functions you have written with a couple of clicks.
Click the Run or Debug Function codelens to open an input set view
Here you can give inputs to the function and edit the code executing it as you see fit
Click the Run this codelens to run the function
You see the output of the function execution in the opened output terminal
Click the Debug this codelens to start a debugging session.
Function output is shown in the opened debug console
Note for Javascript
In Javascript only code using ES Modules is supported.
Note for Typescript
In Typescript compiling to both Commonjs and ES Modules is supported but your code has to be written using export/ import.
Note for Yarn users
You might need to add the following line to the settings.json-file in the .vscode-folder. This will override the default value as there is some issue with Yarn loading the ts-node ESM loader with the default value.
There are allkinds of settings to customize the function execution. See the available settings from the extension's package.json file's configuration-section here