During development we often print out logs, warnings, and errors to the console to help with the debugging process. However, with the complexity of mobile operating systems and applications, we often need to see what’s happening on the device or being logged by other parts of the operating system. This is where the iOS and Android device logs come in to help; they’ve been completely redesigned in the latest version of Xamarin for Visual Studio.
Getting the Device Logs
When you have an iOS or Android project open in Visual Studio 2015 (Update 3) or higher, you’ll see a new option in the Tools menu to open the Device Log. Additionally, there’s a shortcut that’s been added to the toolbar.
This will launch the Device Log window and enable us to select a device that is plugged in. For Android, it will show all Android devices plugged in to your local PC and any iOS device plugged into your Mac that is connected to Visual Studio for iOS.
Selecting a device will start displaying the logs in real time. We can now pause, stop, clear, search, and even filter through the logs to find what we’re looking for:
Learn More
The new Device logs are available today in the latest Stable release of Xamarin for Visual Studio (4.2). Browse through the full release notes for even more features that were recently released!
0 comments