0

If you print in log (fileName:lineNumber) you get a nice link in Android Monitor that gets you to that code line when you click on it. This however does not seem to work for my cpp files. Is there a way to achieve this for c++ files?


Edit

I already know how to create string (fileName:lineNumber), but when it is printed in Android Monitor it is not a clickable link. The question is how to make clickable.

rozina
  • 4,120
  • 27
  • 49

1 Answers1

2

To appear as a clickable link in the Android studio Logcat window, (filename.cpp:filenumber) should be associated at least with one file that is part of your AS project:

C++ logcat extract

You can see that some system logs are resolved to clickable links, while the others are not.

Java logcat extract

In the example above, Socket.java is part of public API, while PlaneSocketImpl.java is not, therefore AS does not show a link for the latter.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307