Skip to content
On this page

Debug custom command

js
// script.js
// ....
try {
  await manager.install("clipboardy", "^2.3.0");
  const clipboardy = manager.require("clipboardy");
  // .... code if package installed and imported correctly
  commandValues = JSON.stringify(clipboardy); //JSON.stringify() to print object!
} catch (error) {
  // ... show the error if something wrong
  commandValues = JSON.stringify(error);
}
// ....