Debugging your Application
While you are developing your Equo application, or any other application that consumes Equo Chromium, you will likely run into some problems that require debugging.
Debugging Java in your IDE
When you are developing your application that consumes Equo Chromium, like an Equo application, you will end up running it as a normal Java application.
To debug it in your favorite IDE, you just need to run your application in debug
mode.
Debug and DevTools from your IDE
To debug JavaScript, HTML, and CSS in your IDE you have to run the app with the chromium.debug_port
property, specifying the port for remote debugging. This will also print logs in the console.
The property could be added as VM arguments
in your IDE, or set as system property
in java.
It is also possible to set the property as auto
. This automatically opens an available port for devtools and debug.
Examples:
-Dchromium.debug_port="8888"
-Dchromium.debug_port="auto"
Or as Java System Property:
System.setProperty("chromium.debug_port", "8888");
System.setProperty("chromium.debug_port", "auto");
You must make sure you have the property before running the application EquoApp.launch();
|
Then it will open a browser (i.e. Chrome). You can also enter the following URL in your favorite browser and see all the available browsers of your application to debug:
localhost:8888
There, you can inspect your application elements. Note that to debug JavaScript your Equo application must be already running.