Skip to content

Debugging Sketch Plugin

Konrad Dzwinel edited this page Apr 23, 2018 · 2 revisions
  1. Open Sketch
  2. Create new Sketch document
  3. Inside of the html-sketchapp folder run npm run watch-plugin
  4. Whenever you change the plugin code it will rebuild and run asking you to select .asketch.json files

  1. Load your test .asketch.json files
  2. Analyze the console output and put additional console.logs in code to debug

  1. Go back to 4

Note that line numbers in error messages refer to the transpiled version of the asketch2sketch.js file, that can be found in the /build folder