Debug intents
The AppShell exposes two global methods/variables to troubleshoot the intent functionality. These are:
sendIntent
methodlastIntent
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.
sendIntent
method
The global sendIntent
method has the same functionality as the one described in the Send intents section.
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;
}
You can use this variable to debug the intent-sending functionality of your app.