Debugging a web component
Debugging a Web Component with the GBC front-end
In order to debug a Web Component when displayed on the GBC front-end, start the debug mode of your browser (for example, in Chrome, hit the F12 key), and use the integrated HTML / JavaScript debugger to inspect the Web Component contents.
Debugging a Web Component with the GDC front-end
To enable web component debugging with GDC, define the TCP port where a Chrome browser can connect to, in order to use the QT WebEngine Developer Tools.
With GDC, the web component debug port can be defined with the
--webengine-remote-debugging
command line option, or by setting the
QTWEBENGINE_REMOTE_DEBUGGING environment variable, before starting the GDC.
--webengine-remote-debugging
command line option and the
QTWEBENGINE_REMOTE_DEBUGGING environment variable, the syntax
is:[address:]port
--webengine-remote-debugging
command line option, or when using the
QTWEBENGINE_REMOTE_DEBUGGING environment variable. See QT documentation for more details about
debugging features when QTWEBENGINE_REMOTE_DEBUGGING is set.Define a simple port
number, or a network interface address
and port with address:port
. The
address:port
syntax can be used to control
which network interface to export the interface on, to access the developer tools from a remote
computer. If no address is specified, it defaults to
localhost
.
http://localhost:port
(when the GDC executes on the current host)http://hostname_or_IP:port
(when the GDC executes on a remote machine)
For example, to restrict the access to the debugging tools to the local machine on port
9000
, use the value "127.0.0.1:9000"
. To (theoretically) access
from any computer in your network on port 9000
, use
"0.0.0.0:9000"
.
Debugging a Web Component with the GMA front-end
In order to debug a web component displayed on GMA, you need a Chrome web browser, and an USB cable to plug the device to your computer.
- Connect your device to your desktop with the USB cable.
- Stop GMA on the device, if it is already running.
- Enable debugging option in GMA parameters.
- Start the application with a web component. This will start GMA with debug service enabled (please wait as the application could take longer to start)
- Open Chrome on the desktop computer.
- In the Chrome URL address bar, enter:
chrome://inspect/#devices
- On the device, accept the USB debugging.
- Click on "inspect" link to open the HTML debug window.
Debugging a Web Component with the GMI front-end
In order to debug a web component displayed on GMI, you need to setup the SafariĀ® Web Inspector. Check the AppleĀ® development site for more details about enabling the Safari Web Inspector: http://developer.apple.com.
- On you Mac, open Safari and make sure the "Develop" option is available. If this option is not available, go to Safari preferences and enable the option.
- On the device, go to Settings. In Safari preferences, go to Advanced and enable the Web Inspector option.
- Run the app on the device or simulator, or start the program in development mode to display on the GMI front-end.
- On the Mac, find the connected device/simulator in the Develop menu of Safari and browse the debuggable components.