Thanks for asking question! It looks like your code is throwing an unhandled exception. That is why you see the error further its saying that setting the configuration to development mode you'll will get a more detailed error.
You may want to know that Azure provides built-in diagnostics to assist with debugging an App Service app.
Check this article on how to enable diagnostic logging and add instrumentation to your application, as well as how to access the information logged by Azure.
You may also refer to this tutorial to use Visual Studio tools to help debug an app in App Service, by running in debug moderemotely or by viewing application logs and web server logs.
Let us know.