ProfessionalCommunity Edition

Troubleshooting Bambdas

  • Last updated: February 13, 2025

  • Read time: 2 Minutes

This guide helps you troubleshoot issues while writing Bambdas.

Compilation errors

When you're creating a Bambda, Burp highlights any compilation errors in real time. You must resolve these errors before you can apply your Bambda.

You can view compilation errors in the following ways:

  • Hover over the red underline in the Bambda editor.

  • From the Bambda library editor, click Save. Error details are shown in the Compilation errors tab.

  • From a tool-specific Bambda editor, click Apply. Error details are shown in the Compilation errors tab.

Note

Compilation errors are detected based on the function and location of the Bambda. For example, if you're writing a view filter WebSockets Bambda, Burp checks that the code complies with the specific requirements for a WebSockets view filter.

Runtime errors

Runtime errors occur after a Bambda has been applied. If Burp detects any runtime errors, a warning appears in the relevant Burp tool.

To resolve a runtime error, edit the Bambda to view the error details. You can then make changes to the code, or debug the Bambda using the Logging interface.

Debugging Bambdas

You can use the logging interface to debug your Bambda by printing messages to the console. This can help you resolve runtime errors or issues in your code.

You can access the following functions:

  • logging.logToOutput - Adds standard debug messages to the console.

  • logging.logToError - Adds error messages to the console in red text.

To view messages generated using logToOutput and logToError:

  • From the Bambda library editor, click Save. Messages are shown in the Console tab.

  • From a tool-specific Bambda editor, click Apply. Messages are shown in the Console tab.

Was this article helpful?