Javafx-WebView-Debugger icon indicating copy to clipboard operation
Javafx-WebView-Debugger copied to clipboard

Source Maps troubleshooting

Open bolerio opened this issue 5 years ago • 2 comments

I integrated by copy & pasting from the sample code, I'm loading a file from the file system and it's a webpack environment. Source maps show when the same code is accessed via a web server and a Chrome instance. But when loading with WebView, the source maps are not found, and it's hard to debug a minified version. Is there any way to make source maps accessible via the debugger?

bolerio avatar Oct 10 '18 05:10 bolerio

Ok, I got pass that. So feel free to close this.

However, the debugging is not stopping on breakpoints. I downgraded to the version of Chrome you recommend. I couldn't downgrade to Java 8 u151, I have to u181 because my app doesn't run on older Webkit. Any idea how to troubleshoot? I see lots of chatter on the Java console about debug protocol messages being received and sent....

Anyway, thanks for great work and effort, must be really painful to work on and debug this stuff!

bolerio avatar Oct 11 '18 03:10 bolerio

@bolerio, debugger code is a real PITA to debug because of threading issues and async processing with the limitations that JavaFX script debugger cannot handle some async recursion.

Requests originate in one thread and must be passed to the debugger on the JavaFX thread while keeping track of state to avoid crashing the JavaFX debugger. At the same time, you cannot arbitrarily allow a thread to yield because then events can occur out of order. It is a trial and error process working with logs which spew out tons of text.

I get the hives just thinking about going in to debug this code again. 😟

I will take a look to see what causes can be caught by the code to flag initialization quirks which can cause break points not to trigger. However, I noticed that debugger not triggering occurs if there is an initialization failure to inject debugger code.

vsch avatar Oct 15 '18 08:10 vsch