Move away from having "tab" objects.
Instead focus on bare minimal data.
* Two distinct list of URLs (Array of strings), for all source URLs which should be:
- opened in tabs (state.tabs.urls)
- pretty printed (state.tabs.prettyPrintedURLs)
These two lists are persisted in async storage and re-appliead on page reload and after devtools restarts.
* List of source objects (Array of objects) which are currently displayed in tabs (state.tabs.openedSources).
This list is transient and cleared on page reload.
This simplify lots of logics as this is now URL and source based.
Also, we don't need to store the precise `sourceActor` selected by the tab as it only display source information.
Differential Revision: https://phabricator.services.mozilla.com/D259173
Register them as soon as we open devtools, instead of waiting for debugger panel opening.
So that breakpoints can work even if we did not open debugger panel yet.
So far, only debugger statement would force the opening of the debugger.
This allows to remove the redundant code from debugger frontend.
Also clarify in this patch that thread-utils exports thread configurations.
Differential Revision: https://phabricator.services.mozilla.com/D205772
This toggle is checked by default so that debugger statements are still enabled by default.
As for other settings, this is preserved on restart so that it is handy for users willing to
always keep them disabled. But it may be an annoyance for others forgetting that they once disabled them.
Differential Revision: https://phabricator.services.mozilla.com/D193431
Convert all imports but the one related to SessionDataHelper
as that's an hybrid module which is loaded as a JSM from the main thread,
but loaded as a common js module from the worker thread.
We will be able to drop this once we can migrate this JSM to ESM
once we support loading ESM from the worker thread.
Differential Revision: https://phabricator.services.mozilla.com/D158007
This will help transition to ES Modules as this symbol is exposed to them.
$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests
Differential Revision: https://phabricator.services.mozilla.com/D156401
Because WASM debugging triggers different machine code with debugging instruction,
the memory usage very significantly increase.
So avoid enabling it until the debugger is opened.
Differential Revision: https://phabricator.services.mozilla.com/D140069
This patch includes the following:-
- The reducer logic to store the blackbox url and range info matches that on the
server here https://searchfox.org/mozilla-central/rev/dfc0dea63a16b73078a46b6ae49b2a626b8c11b5/devtools/server/actors/utils/sources-manager.js#289-335
Note: The client logic supports multiple ranges whhile the server supports one range (maybe we can add support for multiple to the server).
- Added jest tests for some edge cases
- Changed the asyncStore pref from `tabsBlackBoxed` to `blackboxedTabs` for readability ease
and to avoid and errors as the format of the data stored changes.
Before: `asyncStore.tabsBlackBoxed = ["foo.com", "bar.com"...]`
After: `asyncStore.blackboxedTabs = { "foo.com": [], "bar.com": [range, range, ...] }`
The range sturcture
```
const range = {
start: { line: 1, column: 5 },
end: { line: 3, column: 4 },
}
```
Differential Revision: https://phabricator.services.mozilla.com/D132774