How To Debug Custom Cards?

Hi, I am wanting to learn how to develop custom cards. I have read through the development documents and forum, and have adapted the “content-card-example” to my basic needs.

If I make a mistake in the script, I don’t know where or what the mistake is. After I restart Hass.io, clear the cache is see “Custom element doesn’t exist: content-card-example.” on the tab I have the card in.
I then go back through undoing / making changes until it works, repeating the process above.

I was wondering, is there a better workflow others are using. Is there a log for example somewhere that shows the error and line number etc. Or a way of checking the script before restarting.

Thanks for any help.

F12 shows the dev console in chrome and shows errors and line number of error too…