0

I am currently trying to enable remote inspector for a OpenJFX web view component in order to be able to debug javascript code interactions with the Java part of the application. This is why I cannot debug the web part in a standalone browser.

There appears to be no detailed documentation related to remote inspector besides a few fixed scenarios which have pre-configured solutions available. Based on reverse-engineering and other research, I was able to piece together the following:

  • I have obtained an instance of Debugger interface out of the OpenJFX WebEngine instance;
  • I have created a simple TCP server which communicates with the WebKit browser using its protocol (eg. messages like "SetupInspectorClient", "GetTargetList", "SendMessageToBackend", etc.). This is enough to make the remote WebKit browser recognize my view when opening the inspector://localhost:<port> URI;
  • When attempting to connect to a particular view, the majority of the communication is handled by the "SendMessageToBackend" and "SendMessageToFrontend" messages forwarded by my code between remote WebKit browser and the Debugger instance. However, based on communication traces the only response that the remote browser receives to its requests is a "'Target' domain was not found" and "'Browser' domain was not found" errors.

I presume the above problem may be caused by either incompatible webkit versions between OpenJFX and my remote browser - although I am using WebKit 613.1 on both ends. Other possibility is that the OpenJFX uses some sort of stripped-down WebKit which does not support the inspector commands at all. However, I don't know enough about WebKit to be able to find it out on my own.

Is it possible to get remote inspector working in OpenJFX 17, and if yes, then how?

j_kubik
  • 6,062
  • 1
  • 23
  • 42

0 Answers0