Install the extension from the VSCode marketplace.
Sign up for Thundra and select the Thundra Debugger option to receive your authentication key. If you’ve already signed up, you can get your key from the settings page.
Open the Command Palette (⇧⌘P) and select the Thundra: Edit Configuration
command to modify the configuration file.
Set your authentication key to the variable “authToken” in your Thundra configuration file.
debug-client.json{"profiles": {"default": {"debugger": {"authToken": <set-your-thundra-auth-token>,"sessionName": "default","brokerHost": "debug.thundra.io","brokerPort": 443}}}}
Set a debugging point on your AWS Lambda function.
Execute the command Thundra: Start Debugger
to start the debugging session. (Alternatively, you can click on the Start Thundra Debugger
button on the Status Bar.)
Now invoke your AWS Lambda function to hit on the debugging point.
The debugging session ends when your AWS Lambda function times out. You can update the timeout of your function for longer sessions.
To manage your Thundra Debugger profiles:
Open the Thundra configuration file by executing the command Thundra: Edit Configuration
.
Add new profiles to the file as shown below.
You can change your active profile by executing the command Thundra: Change active profile
to use the Thundra Debugger with different configurations.
In order to quickly start with a different session name:
Execute the command Thundra: Start Debugger (with a session name)
Enter a unique session name (this will not make changes to the configuration file).
Invoke the Lambda function and start debugging.
Command | Description |
| Starts the debugger with the current profile's settings. |
| Starts the debugger with the given session name. |
| Changes the active profile to the one given in your configuration file. |
| Opens the file containing your debugger configuration so you can edit it. |
You can access all of the above commands from the command palette (Cmd+Shift+P or Ctrl+Shift+P).
When you start the Thundra Debugger in VSCode, if you are getting the "Error processing attach: Error: Could not connect to debug target at ..." error; you can add "debug.javascript.usePreview": false
configuration in your settings.json
file. You can check out how to find settings.json
file here.