Docs

Running and Debugging

An efficient testing and debugging workflow is crucial when developing extensions. Sliprail provides simple ways to load and debug your extensions locally.

Loading Local Extensions

For private extensions or for public extensions before they are published, you can use the local loading feature to test and develop in real-time within Sliprail.

  1. Open Sliprail Settings: Bring up Sliprail and navigate to the extension management interface.
  2. Load Local Extension: Find the option to "Load Local Extension".
  3. Select Directory: Choose the root directory of your extension project (the one containing your manifest.json file).

Once loaded, your extension will be immediately available in Sliprail. Any code changes you make can be reflected immediately after a reload.

Debugging Your Extension

Sliprail provides a built-in debugging feature to help you identify and fix issues: the debug log.

Using the Debug Log

The @sliprail/sdk package provides a debug logging API, allowing you to print debug information during your extension's execution.

  • Use the debug log API to output variable values, trace execution flow, or flag potential issues.
  • You can control the verbosity of the debug output based on your development needs.

Accessing the Debug Log

To view the debug messages from your extension:

  1. Open Settings: Navigate to the Sliprail settings panel.
  2. Click Debug Log: Find and click the "Debug Log" option.
  3. View Output: The debug log file will open in your default text editor, displaying all debug messages from your extension.

This feature provides direct access to debugging information, allowing you to easily monitor your extension's behavior and troubleshoot issues during development.