0

I am trying to view a url in the logcat window in Android Studio while doing some debugging, but I can't see the full url, it gets shortened with an ellipsis at the end.

enter image description here

Double-clicking on the url takes me only to the shortened URL. How do I enable the full URL? I can't see any options for this in logcat.

Greg Quinn
  • 1,927
  • 1
  • 23
  • 26
  • You seem to be printing the Intent / Bundle here. You can print the complete url directly instead like: `Log.d("AppTag", intentUrlToCopy)`. – Darshan Jun 20 '23 at 05:32
  • @Darshan I'm not 'printing' the url manually, I'm doing Azure B2C authentication and trying to log all the URLs its trying to access so I can debug the trail of URLs the webview is accessing. Do you know how to log every url the webview goes to? It doesn't seem to be doing so in the logs. The webview is opened by the auth plugin so I don't really have control in the process. – Greg Quinn Jun 21 '23 at 00:59

1 Answers1

0
  1. Increase the logcat window width - You can simply drag the right edge of the logcat window to increase its width and show more of the URL.
  2. Copy and paste the URL elsewhere - Select the truncated URL in the logcat, copy it, and paste it into a text editor or browser to view the full URL.
  3. Use the "Open URL" feature - Right-click on the truncated URL and select "Open URL". This will open the full URL in the default browser.
  4. Use the Message Filters - Click on the filter icon (funnel icon) at the top of the logcat window. Select "Edit Filter Configuration". In the "General Filters" section, check the box for "URLs: Open in default browser". Now anytime a URL appears in logcat, it will be highlighted and clickable. Clicking it will show the full URL and open it in your browser.
  5. Increase the max logcat message length - In Android Studio, go to File → Settings (or Android Studio → Preferences on Mac), select Editor → Colors & Fonts → Android Logcat. Increase the value of "Max message length" to something longer, like 2000. Now URLs up to 2000 characters will be shown in full in the logcat window.
  6. Use the "Open File at Cursor" feature - Right-click on the truncated URL and select "Open File at Cursor". This will open the source file containing that log statement with the cursor focused on that line. You can see the full, untruncated URL in the source code.
flypig
  • 19
  • 4