Xano Documentation
  • 👋Welcome to Xano!
  • 🌟Frequently Asked Questions
  • 🔐Security & Compliance (Trust Center)
  • 🙏Feature Requests
  • 💔Known Issues
  • Before You Begin
    • Using These Docs
    • Where should I start?
    • Set Up a Free Xano Account
    • Key Concepts
    • The Development Life Cycle
    • Navigating Xano
    • Plans & Pricing
  • The Database
    • Designing your Database
    • Database Basics
      • Using the Xano Database
      • Field Types
      • Relationships
      • Database Views
      • Export and Sharing
      • Data Sources
    • Migrating your Data
      • Airtable to Xano
      • Supabase to Xano
      • CSV Import & Export
    • Database Performance and Maintenance
      • Storage
      • Indexing
      • Maintenance
      • Schema Versioning
  • 🛠️The Function Stack
    • Building with Visual Development
      • APIs
        • Swagger (OpenAPI Documentation)
      • Custom Functions
        • Async Functions
      • Background Tasks
      • Triggers
      • Middleware
      • Configuring Expressions
      • Working with Data
    • Functions
      • AI Tools
      • Database Requests
        • Query All Records
          • External Filtering Examples
        • Get Record
        • Add Record
        • Edit Record
        • Add or Edit Record
        • Patch Record
        • Delete Record
        • Bulk Operations
        • Database Transaction
        • External Database Query
        • Direct Database Query
        • Get Database Schema
      • Data Manipulation
        • Create Variable
        • Update Variable
        • Conditional
        • Switch
        • Loops
        • Math
        • Arrays
        • Objects
        • Text
      • Security
      • APIs & Lambdas
        • Realtime Functions
        • External API Request
        • Lambda Functions
      • Data Caching (Redis)
      • Custom Functions
      • Utility Functions
      • File Storage
      • Cloud Services
    • Filters
      • Manipulation
      • Math
      • Timestamp
      • Text
      • Array
      • Transform
      • Conversion
      • Comparison
      • Security
    • Data Types
      • Text
      • Expression
      • Array
      • Object
      • Integer
      • Decimal
      • Boolean
      • Timestamp
      • Null
    • Environment Variables
    • Additional Features
      • Response Caching
  • Testing and Debugging
    • Testing and Debugging Function Stacks
    • Unit Tests
    • Test Suites
  • CI/CD
  • File Storage
    • File Storage in Xano
    • Private File Storage
  • Realtime
    • Realtime in Xano
    • Channel Permissions
    • Realtime in Webflow
  • Maintenance, Monitoring, and Logging
    • Statement Explorer
    • Request History
    • Instance Dashboard
      • Memory Usage
  • Building Backend Features
    • User Authentication & User Data
      • Separating User Data
      • Restricting Access (RBAC)
      • OAuth (SSO)
    • Webhooks
    • Messaging
    • Emails
    • Custom Report Generation
    • Fuzzy Search
    • Chatbots
  • Xano Features
    • Snippets
    • Instance Settings
      • Release Track Preferences
      • Static IP (Outgoing)
      • Change Server Region
      • Direct Database Connector
      • Backup and Restore
      • Security Policy
    • Advanced Back-end Features
      • Xano Link
      • Developer API (Deprecated)
    • Metadata API
      • Master Metadata API
      • Tables and Schema
      • Content
      • Search
      • File
      • Request History
      • Workspace Import and Export
      • Token Scopes Reference
  • Xano AI
    • Building a Backend Using AI
    • Get Started Assistant
    • AI Database Assistant
    • AI Lambda Assistant
    • AI SQL Assistant
    • API Request Assistant
    • Template Engine
    • Streaming APIs
  • AI Tools
    • MCP Servers
      • Connecting Clients
      • MCP Functions
  • Xano Transform
    • Using Xano Transform
  • Xano Actions
    • What are Actions?
    • Browse Actions
  • Team Collaboration
    • Realtime Collaboration
    • Managing Team Members
    • Branching & Merging
    • Role-based Access Control (RBAC)
  • Agencies
    • Xano for Agencies
    • Agency Features
      • Agency Dashboard
      • Client Invite
      • Transfer Ownership
      • Agency Profile
      • Commission
      • Private Marketplace
  • Enterprise
    • Xano for Enterprise
    • Enterprise Features
      • Microservices
      • Tenant Center
      • Compliance Center
      • Security Policy
      • Instance Activity
      • Deployment
      • RBAC (Role-based Access Control)
      • Xano Link
  • Your Xano Account
    • Account Page
    • Billing
    • Referrals & Commissions
  • Troubleshooting & Support
    • Error Reference
    • Troubleshooting Performance
      • When a single workflow feels slow
      • When everything feels slow
      • RAM Usage
      • Function Stack Performance
    • Getting Help
      • Granting Access
      • Community Code of Conduct
      • Community Content Modification Policy
  • Special Pricing
    • Students & Education
    • Non-Profits
  • Security
    • Best Practices
Powered by GitBook
On this page
  • Testing a Function Stack
  • Using the Debugger
  • Simple Mode
  • Advanced Options
  • Unknown Errors and Debugger Errors

Was this helpful?

  1. Testing and Debugging

Testing and Debugging Function Stacks

Last updated 1 month ago

Was this helpful?

Testing a Function Stack

1

Click at the top of your workflow to execute it.

Clicking this button opens the Run panel.

2

Populate any necessary inputs.

This information will be used to test your workflow. If you're copying and pasting JSON from another source, you can use the Format button to quickly turn it into a readable structure if necessary, although this will not impact the functionality of your test run.

3

Click to execute the workflow.

4

Review the response and timing, if desired.

Response

The response block will show you what the workflow has returned, if applicable, once execution has completed.

You can see the amount of time the request took to complete, and perform several actions from inside this block.

Click to copy the contents of the response

Click to copy the request as a cURL command to be used outside of Xano

Click to create a based on this run.

Click to activate the debugger — more on this below.

Timing

You can further review more information for each step that executed during this run in the Timing block.

This block will provide individual timings for each step, allowing you to quickly pinpoint any points of delay that could be improved. You can also click the > icon next to each step to review that step's output for further investigation.

5

What's next?

Run it again by clicking Run Again , reset everything back to the initial state by clicking Reset , or activate the debugger with Activate Debugger .

You can also use this opportunity to define sample inputs and responses for your Swagger (OpenAPI Documentation).


Using the Debugger

The Debugger is used to review each step of execution, one at a time, to pinpoint the cause of any issues that might arise during that run.

Please note that each step is not actually individually being executed; the full run has completed prior to the debugger being available.

Simple Mode

Stop Debugging

Restart the Debugger

Move to the next step

As you move through each step, the current will be highlighted as shown below.

Completed steps will be highlighted in green.

As you progress through each step, the Variables panel will update with current data.

Clicking different steps in your function stack will bring the debugger to that point.

Advanced Options

  • Step Over - When working with nested function stacks (custom functions or middleware), if you don't need to debug those, just step right over them and continue with the next function in your function stack

  • Step Into / Step Out - Step into or out of a nested function (custom function or middleware) and continue the debugging experience seamlessly

  • Continue - Continue with execution of your function stack

  • Enable Breakpoints - Enable or disable breakpoints as a whole

  • Step Forwards / Step Backwards - Toggle forward or reverse execution of your function stack

  • Result - View the result of your completed execution

  • Watches - Use custom Javascript expressions for more complex data monitoring or calculation as your function stack executes

  • Variables - View the current contents of your variables as the function stack executes

  • Copy 📄 / Add Watch 👁️ - Copies the variable's current contents, or adds a variable to your Watches list

  • Breakpoints - Hover over the icon on the left side of each function to establish a breakpoint. Breakpoints will cause the debugger to pause at that step.

Unknown Errors and Debugger Errors

Unknown Error

The debugger encountered an error

If you see these messages, they could indicate one of the following:

  • An unhandled exception in your logic

    • This means that you've likely ran across a rare error that we don't yet have specific messaging for. Please let us know about this so we can make an adjustment.

  • Server resource issues

You can also try running your function stack in Safe Mode.

Click to enable the advanced debugging options.

For assistance with either of these errors, please reach out to our support team. You can also review our documentation on to narrow down the cause.

memory usage
unit test

Hint - Running in Safe Mode

If you're running into memory issues when running large function stacks or working with large data sets, you can run with Safe Mode by clicking the arrow next to the Run button and choosing Safe Mode.

Safe Mode runs the function stack without retaining any context in memory, which can be very helpful when looping over a significant amount of data and you're experiencing crashes. No context just means that things like autocomplete won't work, and the output of debugging information will be limited.

Any questions, please reach out to our support team!

Hint - Running in Safe Mode

If you're running into memory issues when running large function stacks or working with large data sets, you can run with Safe Mode by clicking the arrow next to the Run button and choosing Safe Mode.

Safe Mode runs the function stack without retaining any context in memory, which can be very helpful when looping over a significant amount of data and you're experiencing crashes. No context just means that things like autocomplete won't work, and the output of debugging information will be limited.

Any questions, please reach out to our support team!

When in Xano, you can define sample input and output examples for your Swagger documentation.

It is important that you do this to ensure that your documentation is as effective as possible, as well as for helping AI models understand what's expected when interacting with your APIs.

1

In the 'response' section of the Run panel, click Set As Example

2

Review the sample input and response, and make any necessary adjustments

Make sure these do not include any sensitive information.

3

Click Save and you will see these defined in your Swagger documentation.

If you need to make adjustments later, you can do so from the settings menu.

testing your function stacks