Bug 43895 - [VS 2015 only] New "Integrated" log from "Tools > Android > Device Log" doesn't have the "Text View" button that was part of the old "Android Device Logging" view
Summary: [VS 2015 only] New "Integrated" log from "Tools > Android > Device Log" doesn...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: Normal enhancement
Target Milestone: 4.4.0 (C10)
Assignee: Adrian Alonso
URL:
Depends on:
Blocks:
 
Reported: 2016-08-31 09:48 UTC by Hrvoje
Modified: 2017-05-17 12:47 UTC (History)
10 users (show)

Tags: BZCU DeviceLog
Is this bug a regression?: Yes
Last known good build: Cycle 7 SR1 (XamarinVS 4.1.2.18 (fcbe082))


Attachments
Screen capture of opening the android log window on Cycle 7 (XamarinVS 4.0) (1.23 MB, application/x-shockwave-flash)
2016-09-01 17:55 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details
Screen capture of copying and pasting lines from device log in Cycle 8 (683.58 KB, application/x-shockwave-flash)
2016-09-01 20:34 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Hrvoje 2016-08-31 09:48:05 UTC
In beta 6.2.0.47 there is no way in Visual studio 2015 to open Android Device Log window (LogCat).
Even in menu this option is dimmed.
Comment 1 Al Clark [MSFT] 2016-09-01 11:34:25 UTC
A new Beta version 7.0.0.3 was pushed yesterday - could you please try that and confirm if the ADB option is still disabled for you?
Comment 2 Hrvoje 2016-09-01 12:45:53 UTC
With beta 6.2.0.47 I had also problem that occurs on second build.
First build was OK, but then folder "obj\Debug\__library_projects__\OkHttp\library_project_imports" stayed locked somehow.
That is way I installed alpha, and after that VS begun to behave crazy.
After unsuccessful digging, and uninstalling JDK, Android SDK etc., I decided to completely uninstall everything.
Now, my question before installing current beta is:
What are prerequisites for version 7.0.0.3?
What Android SDK version, platform tools version etc.
Comment 3 Hrvoje 2016-09-01 13:52:31 UTC
With beta 6.2.0.47 I had also problem that occurs on second build.
First build was OK, but then folder "obj\Debug\__library_projects__\OkHttp\library_project_imports" stayed locked somehow.
That is way I installed alpha, and after that VS begun to behave crazy.
After unsuccessful digging, and uninstalling JDK, Android SDK etc., I decided to completely uninstall everything.
Now, my question before installing current beta is:
What are prerequisites for version 7.0.0.3?
What Android SDK version, platform tools version etc.
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-01 17:55:17 UTC
Created attachment 17297 [details]
Screen capture of opening the android log window on Cycle 7 (XamarinVS 4.0)

Hi Hrvoje,

It sounds like Comment 2 (and Comment 3) is about a different behavior than the original description in Comment 0, is that correct?  By default, I like to recommend filing a new bug report for new symptoms, particularly when they happen at different stages (for example, Comment 0 is unrelated to building or deploying, while Comment 2 sounds like it is related to building and deploying).  Separate bugs will help ensure that each symptom is investigated.



In any case, as an initial point of comparison, I tried the following steps:

1. Create a new "Visual C# > Android > Blank App (Android)" app.

2. Select "Tools > Android > Android Device Logging" or click the corresponding icon in the toolbar.

3. Close the Android device logging window.

4. Add a reference to ModernHttpClient, and add a simple call using `NativeMessageHandler` to make use of ModernHttpClient (based on the error message about "OkHttp" from Comment 2).

5. Start debugging the app on device.

6. After the `HttpClient` request succeeds, stop debugging the app.

7. Repeat steps 5 and 6.




## Results

Those steps were successful in my tests.




## Environment info

I will fill in a few more details about my version info shortly.  For the moment, let me list just a few basics that I used:


- A target framework in the project properties of Android API 24

- Java 7 JDK

- Tested on an LG Optimus L9 Android 4.1 (API 16)

- Windows 8.1 (64-bit)

- Visual Studio 2015 Professional Update 1

- Xamarin for Visual Studio 4.2.0.628 (the current beta version from yesterday)
Comment 5 Hrvoje 2016-09-01 19:51:36 UTC
Thank you for your effort.
Is I said I reinstalled everything and didn't expect you to help me solve this.
Now I have beta 7.0.0.3 and I found Device Log, no more Android Log, but new Device Log.
Is that Device log intented replacement for Android log from 7.0 version?

Unfortunately, it hasn't got all features that Android Log window had.
- only displayed as grid, no way to get plain text log

Improved features are:
- Has full time (including milliseconds)
- Has filtering by everything

Missing feature (both Android Log, and new Device Log) is copy paste functionality when we are filter rows (including ability to select more than on row at the time),
Comment 6 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-01 20:34:06 UTC
Created attachment 17303 [details]
Screen capture of copying and pasting lines from device log in Cycle 8

> I found Device Log, no more Android Log, but new Device Log.
> Is that Device log intented replacement for Android log from 7.0 version?

Yes, that is indeed an intentional change:

https://developer.xamarin.com/releases/vs/xamarin.vs_4/xamarin.vs_4.2/#devicelog


(Also, apologies for my mislabeled screen capture in Comment 4.  That was actually showing the behavior of the old Cycle 7 "Android Device Logging", rather than the new Cycle 8 integrated "Device Log".  I have updated the label on that screen capture accordingly.)



> no way to get plain text log

That's an interesting point.  If needed you can always get the device log by hand using `adb logcat` on the command line (See for example "Android adb logcat log" on https://kb.xamarin.com/customer/en/portal/articles/1675684#adb-logcat.).  But the Xamarin team can also definitely keep the idea of adding back a text view in the new "integrated" device log as an enhancement request for the future.


(Another feature I notice has been removed is the icons to filter by warning, error, or information.  Those icons are _present_ in the Xamarin Studio device log pad, so I suspect there are still some plans to examine the new device log in comparison to the Xamarin Studio pad to get them both matching up.  Perhaps as part of that effort, a text-only view can be added to both of those views, in both Xamarin Studio and Visual Studio.)



> Missing feature (both Android Log, and new Device Log) is copy paste functionality when we are filter rows (including ability to select more than on row at the time),

I was able to do the following:

1. Enter a search term in the search field of the Device Log window.

2. Hold the "Control" key on the keyboard.

3. Select individual lines by clicking them with the mouse.

4. Type the "Control-C" keyboard shortcut to copy the lines.

5. Switch to Notepad.

6. Type the "Control-V" keyboard shortcut to paste the lines.

(See also attached screen capture.)


Did you have a different workflow in mind for this?
Comment 7 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-01 20:49:56 UTC
As a side note in case it might be of interest, the old "Android Device Logging" view is still used in VS 2013 (because the new integrated log "is only supported on Visual Studio 2015 or newer version" per the release notes).
Comment 8 Hrvoje 2016-09-01 20:59:43 UTC
"Another feature I notice has been removed is the icons to filter by warning, error, or information."
I discovered that Xamarin team added column filtering, instead of these icons which is better solution. But I recommend that this column filter icons always stay visible because I didn't know they even exist until i accidentally hovered one column.

Regarding copy paste functionality we should have standard multi-selection behaviour which is:
- ctrl+click
- shift+down arrow
- shift+up arrow
- shift+end
- shift+home
- multiple selection by using mouse
- right click get dropdown menu with copy (and maybe cut also)
- copy by CTRL+C
Comment 9 Brendan Zagaeski (Xamarin Team, assistant) 2016-09-02 17:16:14 UTC
Updating status to "confirmed" since I think this bug now has enough information for the team to review about some interesting potential future enhancements for the "Device Log" view.  Thanks again for the report!
Comment 10 Jose Gallardo 2016-12-27 21:52:41 UTC
Setting target milestone to C10.