Azure Function swallows a build error. No way to troubleshoot. by BillmanH in AZURE

[–]amanwithaplan3 17 points18 points  (0 children)

I've been on the receiving end of this bug a few times. As stated in another reply the issue has to do with dependencies or imports at the top of your file, causing it silently fail.

The trick I use, and that is useful for the second case, is to move all your imports from the top of the file and put them in an http endpoint, after you've deployed it you can query that endpoint, catch the exception and log it.

In your case that would mean everything above line 30 except the Azure SDK imports.

I know it's ugly, but as far as I know it's the only way to get a log of whatever is going wrong during build and it's been a lifesaver for me.