Debugging your Tabris.js Android app
In the latest release of Tabris.js, we have announced improved debugging support on Tabris.js Android. In this tutorial, we will show how to debug your app with Visual Studio Code. Please, refer to Tabris.js documentation to learn how to use another IDE to debug. The recent Tabris.js CLI prepares the launch configuration for the Visual Studio Code. Thus, make sure you’ve installed the latest version of tabris-cli. To debug your existing app, add the launch configuration file to your project from the tabris-cli launch configuration.
You can debug your app when it is built in debug mode, therefore, make sure your app has been built in debug mode. To enable debugging, open the menu in the developer tools toolbar and select Wait for debugger and you should see a popup dialog with IP address and port (port is fixed to 9090).
In the VS Code, click “Run” from the left side menu, select Debug Tabris on Android and run it. VS Code will ask for an IP address from the popup displayed on your Android device.
Tabris.js Android supports all debug features that you need to debug your app. You can set a breakpoint at any line, see variables, add variables to watch, navigate the call stack, etc.
Top-level breakpoints in TypeScript are currently not supported, thus, if you want to stop at top-level, add debugger; statement to the line the debugger should stop at.
Would you use the newer debugger feature while developing your Tabris.js app? Do you miss a feature you would use during development? Let us know!
Feedback is welcome!
Want to join the discussion?Feel free to contribute!