What are some tips/tricks for debugging Arcade scripts in VS Code/Node.js?
(assuming that the Arcade script is fairly vanilla -- as in, it doesn't use many Arcade-specific functions that need to be stripped-out)
For example, Arcade uses console(), whereas VS Code/Node.js uses console.log().
- Solution:
In VS Code, put this line at the top of the script:
console = Object.assign(console.log, console); - That will assign console.log() to console(). Which means I can use the console() script in both programs -- without constantly doing "find and replace" on .log.
- Note: Only use that line in VS Code; it won't work in Arcade (and isn't needed in Arcade).
Any other ideas?
(I'm a novice, so it's possible the console.log() thing is wonky...I'm just trying to learn, and not get too frustrated while I'm at it 🙂
Related: Idea: Arcade Extension for Visual Studio Code