-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Debugging JS web compat issues
Josh Matthews edited this page Jun 16, 2020
·
3 revisions
- build with
--features js_backtraceto automatically receive JS and Rust backtraces whenever an exception is reported - run with
--unminify-jsto store unminified versions of any external scripts that are executed in theunminified-jsdirectory - run with
--local-script-source=unminified-jsto be able to modify the JS that is executed to add debugging information - run with
--pref dom.servo_helpers.enabledto get access towindow.js_backtrace()to print the current JS and Rust backtrace to stdout - RUST_LOG=net::http_loader, then compare the output against the network monitor for the same site in Firefox
- RUST_LOG=ws,net::websocket_loader, then look for unexpected websocket failures
- use
--userscripts=resources/user-agent-jsand modifyresources/user-agent-js/00.example.jsto add polyfills or stubs for missing web APIs - add
onunhandledrejection = function(e) { console.error(e.reason); }to a user script - if in lldb in a C++ spidermonkey stack frame, use
call DumpBacktrace(cx)to see the current JS backtrace in stdout
dom.svg.enableddom.gamepad.enableddom.webrtc.enabled