Reputation: 507
I'm new to Android Studio and Java programming. I have the following draft code:
try {
InetAddress serverAddr = InetAddress.getByName("whatever");
Socket socket = new Socket(serverAddr, 5555);
} catch (UnknownHostException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Socket throws exception of type IOException, so e.printStackTrace() will be called. While running this under debugger, I cannot find a place/window in Android Studio where this stack trace is printed. I guess this must be printed in Android Studio's Console window, but there is nothing printed in there. Android Studio 1.3.2, default settings. So where is this stack trace printed?
Thanks in advance!
Upvotes: 9
Views: 8657
Reputation: 5852
Stack trace will be send to default (console) output. In Android Studio (which is based on IntelliJ idea) is that window called logcat.
If you can not see this tab, go to Window > and click Restore Default Layout You can click Shift + F12 as well.
Upvotes: 11