godot
godot copied to clipboard
[Web] Fix `separate_debug_symbols=yes` and debug experience
[!NOTE] I put the PR for 4.5 as an upcoming (big) PR will need the
CreateTemplateZip()refactor
This PR actually makes separate_debug_symbols=yes work on the Web platform. Beforehand, the option was just ignored by the Web buildsystem.
It also edit the Wasm loading (the JS files edited) in a way to keep intact as much as possible the Response of the wasm file. This makes debugging Godot possible using the C/C++ DevTools Support (DWARF) Chrome extension.
It would be actually nice to use if only it wouldn't crash on breakpoints due to Godot being a little bit too big for its taste. (I think it's fixable, though, but it's up to Google)
The PR is also refactoring a little bit the CreateTemplateZip() function in order to simplify it.