Testing your client apps and diagnosing issues in your server apps just got easier, with Visual Studio 2015 Update 2. Today at Build 2016, we announced several new capabilities of the Developer Analytics Tools (formerly Application Insights tools) – the facility that helps you detect and diagnose issues in your live applications.
Manage beta distribution with HockeyApp
Now you can distribute your device apps (Windows 10 UWP or Windows Forms) to your beta test users right from Visual Studio. This is the first capability of HockeyApp that we’re integrating into Visual Studio.
Beta distribution to a chosen subset of customers or testers can provide valuable information about your app before a broad release. You can use this information to address issues with your app before it becomes a big deal (low ratings, poor feedback, etc.). HockeyApp is our service for managing beta distribution and collecting feedback, usage and crash data.
The menu item takes you to HockeyApp, where you sign in (or sign up if you haven’t been there yet), and then fill out some details of how you’d like your app distributed:
When the upload is complete, you will see a HockeyApp toast with confirmation and a link to the app in the HockeyApp portal.
In HockeyApp, you manage your teams of test users, distribute different versions of your app, get feedback with screenshots, and automated usage and crash reports.
More details on app management is available at the Hockey App Knowledge Base.
Give it a try and let us know what you think.
Application Insights and Visual Studio
Now let’s turn to how we’re improving diagnostics at the server side. Application Insights provides great tools for diagnosing issues, monitoring usage and tuning performance in your server app when it’s up and running. All that works by collecting telemetry from the running app and analyzing it in the Application Insights portal.
But of course you can also use Application Insights while you’re debugging your app on your dev machine. You can use the powerful diagnostic facilities to help fix problems before release.
From Visual Studio Update 2, you don’t have to involve the portal in that experience. A big advantage is that the telemetry from your debugging activities won’t get mixed up with the telemetry from the live version – or from the debugging runs of your team mates across the room. And if you’re writing custom telemetry, you can debug it in the privacy of your own dev environment.
Jump from exception stack trace to code
In Visual Studio, select the exception in the Application Insights search window and scroll to the stack trace. Provided you have the right project loaded, methods in your solution show up as hyperlinks. Click through to the code. Easy.
Search telemetry of local debug sessions
In Visual Studio, there’s an Application Insights search window that’s very similar to the diagnostic search blade in the portal. (It’s been there since Update 1, in case you missed it.)
From Update 2, you can use it either to look at the diagnostic telemetry on the portal, or use it to look at directly the telemetry generated by your debug run – even after it has ended. Pick the options in the Search window’s Settings:
The local view is the default if you’ve added the Application Insights SDK to your app, but haven’t yet configured it to send to the portal. (You get this option when you add Application Insights to your app. It means that you haven’t put an instrumentation key in your ApplicationInsights.config file.)
Search for related telemetry
The search window now has a tab of ‘Related Items’ queries. For example when you are investigating a failed request, use it to find out whether an exception occurred in the context of the request. A normal diagnostic session will involve a few such queries before the root cause is uncovered.
Notice that there’s a back button in the toolbar to return to the previous query.
Find telemetry property values in code
You can use the ‘Find in code’ button in telemetry details to search the matching string in the current open solution. You can imagine using it to find the name of your custom event (e.g. ‘Game Over’) in the solution. The results will show up in Visual Studio "Find Results" list.
Simplified configuration experience for collection of traces from log4net, NLog and System.Diagnostics
Most of your web apps probably already collect traces using logging frameworks like NLog, log4net or System.Diagnostics. If you want to continue using these frameworks, but want to leverage Application Insights for its rich querying and analysis capabilities, then we have a solution for you. Just follow the new streamlined experience to configure collection of your traces and get your data to Application Insights. Either:
- Right-click on the Project Node->Application Insights->Configure Application Insights. Make sure the option for adding the right logging adapter in the configuration window is checked.
- Or when you build the solution after adding a logging framework, notice the pop-up that appears on the top right of your screen. Click the hyperlink to enable trace collection.
Developer Analytics is a developer’s tool. (The clue’s in the name.) Its purpose is to help you continuously improve your application, by understanding how it performs – primarily when it’s in live production, but also in the debugging and beta testing phases.
The updates we’ve released today are another step in that direction. We’ve made it one-click easy to deliver updates to your test users. And we’ve improved the diagnostic experience while you’re developing the next version of your app.
And there’s more...
This post is focused on the various Application Insights and HockeyApp integrations we have enabled in Visual Studio. Don’t forget to check out the broader announcements from Application Insights and HockeyApp at Build.