Sketch plugin debugging

I started Sketch Development and was wondering if any of the webstormers had experience debugging plugins?

I'd love to be able to step into any JS code like I do with AppCode c++.

Sketch plugin UI is HTML, their API is cocoascript/javascript.
https://developer.sketch.com/reference/api/

 

I'm a fairly green javascript developer, so any input, links or doc on how to do this would be greatly appreciated.


Richard.

0
2 comments

Not sure it's possible... No javascript debuggers are mentioned in official docs (https://developer.sketch.com/plugins/debugging), and it seems that debugging in VSCode is not supported (https://sketchplugins.com/d/916-how-to-debug-sketch-plugin-on-visual-code)

0

You can debug using Safari WebInspector (Sketch54 OK) to debug Frontend(Right Lower window) & Cocoscript Runtime(Left Lower window); 

It's very raw; you can see the development snapshot
May it be helpful. Good Luck!

Upper Left Window is the sketch plugin window I developed
Upper Middle Window is the Sketch App
Upper Right Window is the yarn start window
Lower Left Window is the Safari WebInspector to debug Sketch CocoaScript Rumtime
Lower Right Window is the Safari WebInspector to debug Frontend Code of my sketch plugin

1

Please sign in to leave a comment.