In XCode Window Devices and Simulators, I can see console / logs from iPhone just fine but I can't see any logs coming from the paired Apple Watch. In Console.app, it's even worse. I can't see any logs / messages from both the iPhone and the Watch. I have tried to restart my Mac. Apple Product Documentation. Check on your system. Console collects log messages that are generated from your computer and connected devices, and you can use these messages to check on your computer’s performance and solve problems.
☆ ★ ★ ★ ★ Rated (4.3 of 5.0) by 3 reviewers.December 1, 2019 at 10:30 AM
Categories: iTunes, Development | View Comments
In this article, we're going to show you how to view your iPhone's debugging logs live. Updated December 1, 2019: Our suggestions are up to date for iOS 13 and for Windows.
How to Access the iPhone Debug Log/Console on Windows
Unfortunately, Apple Configurator 2 is not available for Windows, so the way to access the iPhone Console/debugging logging is by using the open source project libimobiledevice. The folks over at Quamotion are kind enough to provide compiled Windows ports of libimobiledevice. If you're comfortable using Windows command prompt or power shell, you can download Quamotion's Windows libimobiledevice tools.
The tool you want to run is idevicesyslog.
Note: If you're a more novice user and aren't sure how to use idevicesyslog
, send us a note. I'm considering posting a more user-friendly Windows tool here, but would love to make sure there is interest before taking the time to do so.
How to Access the iPhone Debug Log/Console on macOS
You could get idevicesyslog
on your Mac, but there's two easier ways to view the iPhone console on Mac.
How to use Console on macOS to view the iPhone debug console:
On macOS High Sierra, Mojave, and Catalina, you can use the built-in Console app to access the iPhone debugging log.
Open the Console app, by searching for Console in the spotlight search (magnifying glass) in the upper right corner.
Click your iPhone under Devices on the left side of the window. (If you don't see Devices, in the menu select
View > Show Sources
)(Optional) Click the Clear button at the top of the window, to start the logging fresh.
How to use Apple Configurator 2 to access the iPhone console:
Download the app Apple Configurator 2 from Apple on the Mac App Store.
Run Apple Configurator 2, and double-click on your iPhone.
Click
Console
in the left column.Scroll around, or export your log to a text file using the 'Save' button for easier reading and searching.
If you're testing out a specific problem, I recommend pressing the 'Clear' button to erase all of the old text, reproduce your problem, and then click 'Save' to save the nice isolated log text to a file.
-->This tutorial shows how to create and run a .NET Core console application using Visual Studio for Mac.
Note
Your feedback is highly valued. There are two ways you can provide feedback to the development team on Visual Studio for Mac:
- In Visual Studio for Mac, select Help > Report a Problem from the menu or Report a Problem from the Welcome screen, which will open a window for filing a bug report. You can track your feedback in the Developer Community portal.
- To make a suggestion, select Help > Provide a Suggestion from the menu or Provide a Suggestion from the Welcome screen, which will take you to the Visual Studio for Mac Developer Community webpage.
Prerequisites
Visual Studio for Mac version 8.6 or later. Select the option to install .NET Core. Installing Xamarin is optional for .NET Core development. For more information, see the following resources:
- Tutorial: Install Visual Studio for Mac.
- Supported macOS versions.
- .NET Core versions supported by Visual Studio for Mac.
Create the app
Create a .NET Core console app project named 'HelloWorld'.
Start Visual Studio for Mac.
Select New in the start window.
In the New Project dialog, select App under the Web and Console node. Select the Console Application template, and select Next.
In the Target Framework drop-down of the Configure your new Console Application dialog, select .NET Core 3.1, and select Next.
Type 'HelloWorld' for the Project Name, and select Create.
Macos Console.app
The template creates a simple 'Hello World' application. It calls the Console.WriteLine(String) method to display 'Hello World!' in the terminal window.
The template code defines a class, Program
, with a single method, Main
, that takes a String array as an argument:
Main
is the application entry point, the method that's called automatically by the runtime when it launches the application. Any command-line arguments supplied when the application is launched are available in the args
array.
Run the app
Press ⌥⌘↵ (option+command+enter) to run the app without debugging.
Close the Terminal window.
Enhance the app
Mac Console App Iphone 6s
Enhance the application to prompt the user for their name and display it along with the date and time.
In Program.cs, replace the contents of the
Main
method, which is the line that callsConsole.WriteLine
, with the following code:This code displays a prompt in the console window and waits until the user enters a string followed by the enter key. It stores this string in a variable named
name
. It also retrieves the value of the DateTime.Now property, which contains the current local time, and assigns it to a variable nameddate
. And it displays these values in the console window. Finally, it displays a prompt in the console window and calls the Console.ReadKey(Boolean) method to wait for user input.The
n
represents a newline character.The dollar sign (
$
) in front of a string lets you put expressions such as variable names in curly braces in the string. The expression value is inserted into the string in place of the expression. This syntax is referred to as interpolated strings.Press ⌥⌘↵ (option+command+enter) to run the app.
Respond to the prompt by entering a name and pressing enter.
Close the terminal.
Next steps
In this tutorial, you created a .NET Core console application. In the next tutorial, you debug the app.