Skip to content

Instantly share code, notes, and snippets.

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const {
DEBUG_TARGETS,
REQUEST_WORKERS_SUCCESS,
SERVICE_WORKER_FETCH_STATES,

What is the original test about?

Read the existing test, run it and understand what it is asserting. The shared methods used in those tests should be in one of the following files

  • devtools/client/aboutdebugging/test/head.js
  • devtools/client/shared/test/shared-head.js

Is this already ported?

Sometimes we may already have implemented the test as a side-effect of another bug, so try to check if by any chance this has not already been ported to the new about:debugging.

Can it be ported?

Identify if the features used in the test to migrate are already implemented in the new about:debugging. If they are not, either:

- 3 bananes
- 100g de beurre
- 2 oeufs
- 150g de sucre (dont 1 sachet de sucre vanillé)
- chocolat en poudre non sucré
- 175g de farine
- 1/2 sachet levure (5g)
- 2 cuilleres a cafe de bicarbonate
Melanger beurre, sucre, fouetter pour blanchir. Ajouter oeufs 1 par 1, melanger. Ecraser bananes ajouter
diff --git a/devtools/client/aboutdebugging-new/src/components/RuntimePage.js b/devtools/client/aboutdebugging-new/src/components/RuntimePage.js
--- a/devtools/client/aboutdebugging-new/src/components/RuntimePage.js
+++ b/devtools/client/aboutdebugging-new/src/components/RuntimePage.js
@@ -126,17 +126,19 @@ class RuntimePage extends PureComponent
);
});
return Message(
{
level: MESSAGE_LEVEL.ERROR,

Debug a local Firefox using about:debugging

This is a quick documentation to explain how to setup Firefox on OSX in order to try the "Network Locations" remote debugging in about:debugging.

Start the Client Firefox

Let's assume we are using a "Firefox Nightly" located in the Applications folder.

1 - You can start it once "as usual" by double clicking on the icon. This will be the "Client" where you will open about:debugging.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 26, 2024 22:54
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser! If you absolutely need to use browser instead of desktop app, use an extension to add the string Electron/ anywhere in your user-agent.

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools

Debugging the Browser Toolbox

This documentation is about debugging the Browser Toolbox or Omniscient Browser Toolbox.

Debugging the UI

If you need to debug the client side of the Browser Toolbox, you can simply open another Browser Toolbox from your current Browser Toolbox. Make sure "Enable Remote Debugging" is checked in the DevTools setting of the Browser Toolbox, and then use the regular Browser Toolbox shortcut. It will open another Browser Toolbox (running in yet another Firefox instance).

Let's call this the Browser Toolbox Toolbox.

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test the TargetList API
const { DebuggerClient } = require("devtools/shared/client/debugger-client");
const { DebuggerServer } = require("devtools/server/debugger-server");

API consistency between Front and TargetList

Fronts have onFront(type, callback), offFront(type, callback). The TargetList has listen(type, createCallback, destroyCallback) and unlisten(type, createCallback, destroyCallback).

The two APIs seem to care about similar lifecycles, so it would be great if the API had a similar shape. Having a single method with 2 callbacks means all consumers need to attach their listeners for creation and destruction at the same spot. It might not be flexible enough in all situations?

Proposal 1:

// Content page script
window.value = "init-value";
document.querySelector("input").addEventListener("input", () => {
// Slow down the handler a bit
for (var i = 0 ; i < 1000; i++) {
console.log(i);
}
// Update the value that will be checked by the test
window.value = document.querySelector("input").value;