I'm attempting to debug my Azure Function App, all I get is "An error has occurred" which is making fixing my issues extremely difficult. Any idea how to enable full exceptions to be returned by the application? Anything to make debugging possible as I'm massively blocked by this right now.
Many thanks.
Nick.
Edit: In the table storage log for the function I see the following error,
...obs.Script.Description.FunctionInvokerBase.<Invoke>d__29.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`1.<InvokeAsync>d__8.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<InvokeAsync>d__22.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithWatchersAsync>d__21.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__19.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__13.MoveNext() --- End of inner exception stack trace ---
I see this error even if I manually throw an exception on the first line. Where is the real exception?
Looking at these logs really makes me question Microsoft's decisions at times, how is this useful to anyone? Or am I missing something crucial here?
Okay so this is my solution, this may vary depending on what's wrong for you as the error is so generic. Firstly what I done was disable authentication for my function to try to get the in-browser compiler to work again as this has been broken ever since I done this, it didn't help, it resulted in 404 errors for all of my functions. So I enabled it again, this caused the compiler to start working! It showed that I had a reference mismatch for Azure Storage, somehow my dll was referencing 7.x but was expecting 6.x in the function app, which is odd as I don't recall ever changing it. Anyway, I created a project.json file with the following in,
After uploading this to the folder of each function, it works again. I will now explicitly set all of my external dependencies via a project.json file to hopefully prevent this from happening again.
-