Browser Extension
Console extras
On the Firebase console and in Firestore Studio, Fuego DevTools puts small buttons next to the console's own headers: copy a path or a Fuego link, open what you see in Fuego, copy a document as JSON with its exact values, read dates, export a query's results to CSV or JSON, preview, download or edit in Fuego the files of Storage, copy or open Authentication users, copy the path, the data or the REST URL of a Realtime Database node or open it in Fuego, and open in Fuego the index a query error asks for.
Fuego DevTools adds small buttons to the Firestore pages of two consoles: the
Firebase console (console.firebase.google.com) and Firestore Studio
in the Google Cloud console (console.cloud.google.com). They sit next to the
console’s own headers and follow its light or dark look. Some come from the
page’s address and work on both consoles; the others read the console’s page
and the documents the console received, and are best effort.
Where the buttons go
Choose it in the Fuego DevTools settings, under Buttons in the consoles; an open console tab follows at once:
- On each panel (the default): each panel header gets a small Fuego button. Point at it and its buttons slide out to its left; move away and they slide back, so the collection and document names stay in view. With the keyboard, Tab to it; on a touch screen, tap it. Escape closes it.
- Toolbar: one bar at the end of the path above the panels, for the collection or document you selected, with Copy JSON for a document.
- No buttons: nothing in the consoles. The tooltips with readable dates stay.
On a query, Open query in Fuego, its Fuego link and Export… stay above the results either way.
On both consoles
From the address of the page, so they work on any database the console shows:
- On a collection: Copy path, Fuego link and Open in Fuego.
- On a document: Copy path, Fuego link and Open in Fuego.
- On a query (the console’s query builder): Open query in Fuego and its Fuego link.
Fuego link copies the fuego:// link that opens the collection, document
or query in Fuego: paste it into a ticket or a chat, and whoever has Fuego and
access to the project lands there (see
Windows, links and notifications).
Open in Fuego opens it right away (see
Opening things in Fuego).
A console query does not always fit a Fuego query, and the button says so:
- “Fuego opens the matching documents: a Fuego query has no count, sum or average.”
- “Fuego opens the collection: it cannot open this query.”
- “Fuego could not read this query: the link opens without it.”
The button reads Open query in Fuego only when the link opens the query itself, and Open in Fuego when it opens the collection or the project.
When the console’s own headers are missing, as in the pipeline editor of an Enterprise database or after the console changed its page, a small bar at the bottom of the page offers the same buttons. A pipeline query never appears in the console’s address, so Fuego DevTools cannot open it.
Copy JSON and readable dates
These read the console’s page and the documents the console received, so they are best effort: when Google changes the page, one of them may be missing until an update.
Copy JSON
Under a document’s fields, Copy JSON copies the document as JSON with its exact values: Fuego DevTools saw the console receive the document and kept its typed values (timestamps to the microsecond, references, large integers). Exact JSON in Fuego next to it opens the document in Fuego, with its exact values.
- On the Firebase console, when Fuego DevTools did not see the document whole, the button reads Copy JSON (as displayed) and copies what the console shows: dates, references and large numbers may be shortened. The message says which one you got: “Copied, exact values” or “Copied, as displayed”.
- In Firestore Studio, the two buttons sit next to Add field, and Copy JSON copies exact values only: Studio shows no types and shortens long values, so a copy of what it shows could not be trusted. When Fuego DevTools has not seen the document’s exact values in that tab, Copy JSON copies nothing and says so: open the document again, after reloading the page if the tab was open before Fuego DevTools was there. The same goes right after you edit the document in Studio, until you open it again: Copy JSON never copies the values from before the edit. For a document that does not exist (a path that only holds subcollections), it says there are no fields to copy. Exact JSON in Fuego (in the toolbar, Open in Fuego) opens the document in Fuego either way.
The exact values come from the console’s own traffic: on both consoles Fuego DevTools runs its recorder all the time and keeps the last 2,000 documents the console received, in the page. On the Google Cloud console it keeps only Firestore calls, those Firestore Studio makes for the documents you open included. A document the console loaded before Fuego DevTools was there (just after an install or an update), or one that has left those 2,000, is copied as displayed on the Firebase console, and not at all in Firestore Studio.
Readable dates
Hover a value to see the date it stands for:
- a number that reads as epoch seconds or milliseconds, between the years 2000 and 2100;
- a text that looks like a date and a time;
- a timestamp field: its exact value, which the console shortens.
In Firestore Studio the date shows under Studio’s own tooltip, and a timestamp’s exact value shows once Fuego DevTools has seen the document’s exact values.
On the Firebase console only
The export reads the Firebase console’s page, so it is best effort: when Google changes the page, it may be missing until an update.
Export the query results
On the query builder’s results, Export… opens Export the query results:
- All results, or Up to this many rows: at most 10,000 rows in one export.
- CSV or JSON.
The export turns the console’s own result pages, from the first one, and then goes back to the page you were on, when it is a few pages away. It reads nothing more from the database: the console loaded every result up to the query’s Limit when the query ran, and pages through them in the browser. When the console shows no total, the dialog warns that loading more results from the database may be billed. For more rows, raise the query’s Limit in the console and run it again.
Rows whose document Fuego DevTools saw whole are exported with their exact values, the others as the table shows them; the message counts both (“Rows exported: 120 (as displayed: 8).”). In a collection group query, documents in different collections may share an id: a row is matched to a document only when that is certain, otherwise it is written as displayed, without a path.
On the Firebase console’s Storage page
In the Files tab of Storage, point at a file’s row and a small Fuego strip appears at its right end, over the date: Preview, Download and Open in Fuego. The file you open in the console’s side panel has them there instead, under its name, with words.
- Preview opens the file over the console: images, videos, sounds and PDFs as your browser shows them, and text files (YAML, JSON, code, CSV, logs…) with their syntax in colour and line numbers. Long text shows its first 2 MB. ← and → go to the other files of the folder, Space or Escape closes it.
- Space previews the file under the pointer, or the one in the side panel, as Quick Look does on a Mac.
- Download saves the file under its own name. A file over 32 MB opens in a new tab instead, where your browser saves it.
- Open in Fuego opens the file in Fuego’s Storage explorer. For a text file Fuego can edit, it reads Edit in Fuego.
Preview and Download use the link the console itself uses for a file, which
needs the file’s access token. A file uploaded without one (with the Admin SDK,
gsutil or Fuego, for example) cannot be previewed or downloaded from here:
the preview says so and offers Open in Fuego, which reads the file with
your own account. Fuego DevTools never creates a token, since that changes the
file.
Images, videos, sounds and PDFs show without asking anything. To show a text
file or save a file, Fuego DevTools reads it from firebasestorage.googleapis.com:
the first time, the preview asks you to Allow it, and your browser asks
you to confirm. See Permissions.
With No buttons in the settings, the Storage page gets nothing either.
On the Firebase console’s Authentication page
In the Users tab of Authentication, point at a user’s row and a small Fuego strip appears over the end of its User UID, next to the console’s own buttons:
- Open in Fuego opens the user in Fuego’s Authentication view.
- Fuego link copies the
fuego://link of the user. - Copy JSON copies the user as the console received it, in the shape the
Admin SDK uses (
uid,email,metadata,providerData,customClaims…), dates as ISO 8601. The console is sent each user’s password hash: Fuego DevTools drops it, and the salt, before it keeps anything, so Copy JSON never copies them. A user the console listed before Fuego DevTools was there (just after an install or an update) is not copied: click the console’s Reload above the table, then copy again.
After the console’s menu above the table, Open users in Fuego opens the project’s users in Fuego, and Fuego link copies that link (needs Fuego 2.3.0 or later; an older Fuego reads Update Fuego to open this). With Toolbar in the settings they show with their words; with No buttons, the page gets nothing.
On the Firebase console’s index dialog
When a Firestore query fails because it needs an index, its error carries a link to the console that opens the Create or update indexes dialog with that index filled in. In that dialog, left of the console’s Cancel and Save, a small Fuego strip names the index’s collection and offers:
- Open in Fuego: opens Fuego’s index dialog with the same index filled in. Nothing is created until you confirm in Fuego (needs Fuego 2.3.0 or later; an older Fuego reads Update Fuego to open this).
- Fuego link: copies the
fuego://link of the index.
The strip goes when the dialog closes. With No buttons in the settings, the dialog gets nothing.
On the Firebase console’s Realtime Database page
In the Data tab of the Realtime Database, a small Fuego button in the bar above the data, after the database’s address, holds what you can do with the node the console shows:
- Copy path: its path, such as
/demo/store. - Copy JSON: its data, as JSON.
- REST URL: the address that reads it over the Realtime Database’s REST
API (
https://…firebaseio.com/demo/store.json); it needs your own credentials, as the API does.
Point at a node in the tree and a small strip after its own buttons offers Copy path and Copy JSON for that node.
Copy JSON copies only data the console received whole: the console loads the node it shows with everything under it, and Fuego DevTools keeps what came, in the page. When it did not see a node whole (the page was open before Fuego DevTools was there, or the console loaded only part of a very large node), it copies nothing and says so: open the node in the console by clicking its key, then copy again.
With a Fuego that opens Realtime Database locations, the button above the data and each node’s strip also offer Open in Fuego: the node opens on Fuego’s Realtime Database page, or the button reads Add to Fuego when Fuego does not have the project (see Opening things in Fuego). With an older Fuego, or none, there is no Open in Fuego here (never Update Fuego to open this); it shows by itself once your Fuego can. In Safari this holds for a Fuego in the Applications folder; with a Fuego elsewhere, which Safari lets Fuego DevTools read nothing of, it shows with any Fuego found, and an older Fuego says it cannot open the link.
In Firestore Studio
Firestore Studio gets the buttons that come from the address (Copy path, Fuego link, Open in Fuego and Open query in Fuego), and on a document Copy JSON and Exact JSON in Fuego next to Add field, with readable dates on hover. Copy JSON there copies exact values only (see Copy JSON). There is no export of a query’s results, and no Copy JSON on Studio’s table of documents.
Related
- Opening things in Fuego
- Command palette: paste a Firebase console or Firestore Studio link into Fuego
- Recording and cost: on both consoles, the panel records without a reload
