简体   繁体   中英

Android Log - print link to line of code in c++ file

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.

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提取

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

Java logcat提取

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM