Skip to content

Developing from a folder ​

Load an extension straight from its folder while you work on it: click + beside Apps, then Load a folder (developer)….

A folder extension:

  • is bound to the workspace you loaded it into, on this device only;
  • creates its types there, and re-applies them whenever manifest.json changes. Fields are matched by key, so they keep their IDs and your objects keep their values;
  • reloads its open screens when any file in the folder changes;
  • is approved for whatever its manifest asks, with no prompt;
  • always runs sandboxed, even if the folder holds a signature;
  • shows a Dev badge in the sidebar.

Files and folders starting with ., and node_modules, are left out.

The developer bar ​

An open app from a folder shows a bar with:

  • the folder it's loaded from;
  • Console: what its screens log with console.log, console.warn and console.error, uncaught errors, and Sorus's own messages, such as a call that was refused. The button shows how many errors there are.
  • Reload.

The app's ⋯ menu adds Reload, Package… (see Packaging), and Unload, which removes it from the workspace. Its types and objects stay.

When the manifest is wrong ​

If manifest.json doesn't parse or breaks a rule, Sorus says why, naming the key, such as “movie.year” needs a kind: text, number, …. Fix it and save; Sorus reads it again.

Debugging calls ​

A call the extension isn't allowed to make fails with a PagesError whose code is forbidden and whose message says why, such as object.query: it may query only its own types. See Permissions.