sweet-js / sweet-core

Sweeten your JavaScript.
https://www.sweetjs.org
BSD 2-Clause "Simplified" License
4.58k stars 208 forks source link

How to debug #663

Open aight8 opened 7 years ago

aight8 commented 7 years ago

Please add a easy example how to debug very rudimentary some syntax variables. All examples in the doc are broken. Function import for syntax doesn't work neither.

disnet commented 7 years ago

All examples in the doc are broken.

Do they not work with the npm package for you (surprising)? Or are you working off master (expected, we're about to release a breaking change)?

aight8 commented 7 years ago

No I use the last stable build. Tried some other versions too but doesn't work. I used exactly the example code and many variants. I give some additional infos here when I work again on that part.

I think there must be some more tools for debugging (a built in debugging function), it's incredible difficult to work without some helpful debugging information at least for newcomers. Keep in mind there are no type definitions (no autocompletion support) and the IDE does not support the syntax neither. The online editor "http://sweetjs.org/browser/editor.html" doesn't really work. "highlight macrofication", "macro highlighting" option has no flags, "steps" action does nothing neither. Sometimes the editor doesn't work anymore if there are errors in the code. The current code state is saved also when I open the editor without query string - no action to reset it to the default.

gabejohnson commented 7 years ago

@disnet at the very least we should hide the editor controls that don't do anything.