vsch / Javafx-WebView-Debugger

Full Featured Google Chrome Dev Tools to JavaFX WebView browser debugging.
MIT License
65 stars 11 forks source link

Source Maps troubleshooting #4

Open bolerio opened 5 years ago

bolerio commented 5 years ago

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 commented 5 years ago

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!

vsch commented 5 years ago

@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.