Sample JavaFX WebView application for full featured debugging with Chrome Dev Tools
Switch branches/tags
Clone or download
Latest commit 1ec5ebd Nov 9, 2018

README.md

WebView Debug Sample

WebView Sample application with full featured Chrome Dev Tools debugging using JavaFx WebView Debugger library.

Build status Maven Central status

To try it out download the WebViewDebugSample.jar to an empty directory. The application will create public directory for its HTML page and resources and save a JSON file of script state into WebViewDebugSample.json in this directory.

java -jar WebViewDebugSample.jar

The application will launch and open the Javafx Web View Debugger Readme file as it was converted to HTML by Markdown Navigator plugin, out of laziness and because this page has enough script action to be a good example of debugger's use.

Using the context menu on the main page:

  1. click on the Start Debug

    Context Menu Start,

  2. On some Java you need to use the context menu to reload the page before connecting Chrome Dev Tools. (If you got an application crash after connecting Google Chrome tools without doing this step, then chances are good that this step is needed.)

  3. Click on the Copy Debug Server URL

    context-menu-copy

  4. open Google Chrome, paste the URL in its address bar and hit ENTER.

  5. Hit ⌘R on OS X or Ctrl+F5 on Windows/Linux to reload the page being debugged.

  6. Enjoy full featured debugging of JavaFX WebView!

main-screen

Context Menu Actions

  • Reload Pag : reload the current page
  • Reload Page & Pause: reload the current page and pause in debugger on script execution in the page body
  • Go Back: go to previous address in history
  • Go Forward: go to next address in history
  • Port: x : shows the current port
    • Change to: x-1: allows changing to previous port
    • Change to: x+1: allows changing to next port
  • Start Debugging: start debug web-socket server
  • Stop Debug Server: stop debug web-socket server
  • Copy Debug Server URL: copy the debug web-socket URL to clipboard

Available on Maven

<dependency>
    <groupId>com.vladsch.javafx-webview-debugger</groupId>
    <artifactId>webview-debug-sample</artifactId>
    <version>0.6.4</version>
</dependency>