JAVAFX / WebView / WebEngine FireBugLite or Some other debugger?

后端 未结 3 1018
傲寒
傲寒 2020-11-28 12:05

I am developing an app and need to run a debugger on the WebView/WebEngine part of the application so I can better debug my application. But the code I found across the inte

3条回答
  •  余生分开走
    2020-11-28 12:55

    I found with the JavaFX Webview that the best way of quickly debugging javascript was to do the following:

    webView.getEngine().setOnAlert(new EventHandler>() {
        @Override 
        public void handle(WebEvent event) {
            System.out.println(event.getData());
        }
    });  
    

    That pipes through all your alert("whatever"); pieces of code so you can see what's going on.

提交回复
热议问题