AFAIK Anki doesn’t use an engine for the templating, but has its own implementation.
Cards are displayed in a webview, which means they’re like little websites.
If you learn a bit of web development (HTML/JS/CSS), you can make your cards do anything. Anything that works in a web browser will work on Anki cards too.
My go-to method is to use console.log(...) and then inspect the previewer with the add-on AnkiWebView Inspector.
You could also use remote debugging as described here: How to see card preview's browser console - #3 by gla23
Using an IDE is a bit too much effort to set up in most cases. There’s no native integration for IDEs. But you could create a sample HTML file to test your scripts on / inspect it in the browser.