简体   繁体   中英

Debug azure app service locally?

I try to create a mobile app base on the azure "App Service". I downloaded an example app ( Todo App ) which was ready-to-go.

Now I'm changing it to my needs. The problem is that I get an "internal server error"...

Is there a way to debug the backend service (which runs on azure normally). The backend project can be run locally in Firefox, but that doesn't help me, because the behaviour on the server depends on the SQL database.

Is it possible either to debug with Visual Studio directly on the azure server or run it locally, but simulate the same conditions as on the server (database, connection to a mobile client...)

Yes, you can debug the App Service published on Azure.

Publish your app with visual studio. On settings tab, select the debug configuration.

When published, on Cloud Explorer or Server Explorer (visual studio) search the app and right click on App and click Attach Debugger.

Enable your breakpoint and make the request. Happy debug!

If you update your code and not publish it, I'm not sure how it will behave, better republish and debug again.

(More info: https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-troubleshoot-visual-studio/#remotedebug )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM