Skip to main content

Debug intents

The AppShell exposes two global methods/variables to troubleshoot the intent functionality. These are:

  • sendIntent method
  • lastIntent variable

Prerequisite

To use these methods, you need to use the browser's dev tools and set the JavaScript context to the top. Then you can go to the browser's console and run these methods.

Look at the image below to see where to set JavaScript context to debug intents.

Debug intents

sendIntent method

The global sendIntent method has the same functionality as the one described in the Send intents section.

Tip

You can use this method to debug the intent-receiving functionality of your app.

lastIntent variable

The lastIntent variable is a reference to the most recently sent intent. It allows you to see the last intent sent in your browser window. The variable has the following signature:

lastIntent: {
intentPayload: IntentPayload;
}
Tip

You can use this variable to debug the intent-sending functionality of your app.

Still have questions?
Find answers in the Dynatrace Community