There was a project to allow you to run the pipelines locally so you could do the edit-run-debug loop on your own private environment without committing. It was, of course, canned.
https://github.com/microsoft/azure-pipelines-agent/pull/2687...
However, there are tools to improve QOL. For example:
https://marketplace.visualstudio.com/items?itemName=ms-azure...
A vscode extension that's syntax-aware.
Now, I'll be a bit controversial: if they'd used XML instead of YAML, you could have an xmlns declaration up-top that would give you validation in most decent code editors without user intervention. XML is awful, but it has a lot of useful features that we gave up when we threw the baby out with the bathwater.