r/GoogleAppsScript • u/mysteryv • Mar 29 '24
Question New to Clasp - how to debug
I've used GAS for years, especially for building webapps. I've always done it in the GAS online IDE. Debugging .gs code works great but debugging client-side javascript (using the recommended Include model) has always been a pain.
I'd love to develop in VSCode: write my code, fire up a browser, and test my webapps using VSCode's and Chrome's debuggers.
Recently I've discovered Clasp and I've been wondering if that's been my solution ... develop and debug in VSCode (sweet!) and then push to GAS when ready. But all of the resources and tutorials I can find talk about Clasp installation, bundling, and pushing, but not debugging.
SO before I go down the rabbit hole too far, does anyone using VSCode and Clasp to actually debug their GAS webapps? If so, any resources or hints you and point me to?
5
2
1
u/bas-man-tko Mar 31 '24
I would also like an answer to this. For now I used the stuff that I posted in this question here. I have added a comment with my more or less brute force approach of removing import/exports and eslint-disable statements before pushing using clasp.
4
u/[deleted] Mar 29 '24
I actually find clasp a hassle. I develop frontend on vscode (makes it easier to debug) and debug gs files in browser using google's own debugger.