There is no Inspector button, what am I doing wrong?

SevSev USUniversity ✭✭

I am on Xamarin Studio 6.0.2 with a business license and I have Workbooks 0.9.0.14 and am debugging a Xamarin iOS project using the iSO simulator and the inspector button never shows. I can start a new workbook and play around in there but I cannot inspect my own app. Any ideas what I am doing wrong?

Best Answer

Answers

  • SevSev USUniversity ✭✭

    https://developer.xamarin.com/guides/cross-platform/inspector/inspect/

    Ah, I see it now. Right at the top. I should have just read closer. Thanks and bummer.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @SandyArmstrong Can you clarify something please? My company pays a fortune for full MSDN Enterprise subscription for the entire development department. And I thought that Xamarin was being recognized as the same level as one's Visual Studio installation/license/whatever. So if we have Enterprise MSDN licensing shouldn't we have Enterprise Xamarin and thus the ability to use the Inspector?

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    @ClintStLaurent yes, MSDN Enterprise grants you an Enterprise Xamarin license, as I understand it. Is it not working for you?

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @SandyArmstrong The inspector doesn't work, which is about the only indication I know of. The button is in the toolbar, but disabled (greyed out).

    When I check my Xamarin account from Visual Studio I sign in with my company email (same as for MSDN account) and it displays "Visual Studio Enterprise" on a green field - But still no active Inspector. The button is there in the toolbar, but disabled.

    The Xamarin site page for Inspector also states that the inspector is supposed to be a menu option in Visual Studio under the Tools menu, but it isn't there at all.

    I do notice (now) that the OS requirement is .NET 4.6 or higher. My machine meets that (4.6.2), but the SOLUTION is built against 4.5.2 - Is it possible that the solution needs to be built against 4.6?

    Windows - Windows 7 or greater (with Internet Explorer 11 or greater and .NET 4.6 or greater)

    Wait... In re-reading the page for the umpteenth time I see this:

    Must use XAP or VS Android Emulator

    So does the inspector only work when you debug to an Emulator? It doesn't work when you debug to a physical device? A physical device being the preferred and recommended target by every Xamarin employee to ever open their mouth.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    edited September 2016

    Well... I built a brand new default from template app (with XF nuget updates to bring it up to date).
    It built and ran on my Samsung Tab4 in about 20 seconds.

    After 5 attempts to launch the same project it finally launched on the AVD_GalaxyNexus emulator. About 8 minutes per attempt.
    The Inspector tool button finally became enabled. So that answers that question:** Inspector only works with an Emulator. **(what a waste)
    Considering that when I tried to use the now active Inspector button I was rewarded with an unhandled exception:

    System.Exception: unable to bind to a port within the acceptable amount of time

    It seems even the Inspector tool itself can't deal with the slowness of emulators.

    Such a shame. This looked so promising at Evolve 2016 when it was shown off. It looks great in the still captures on the Xamarin web site. But for real people in the real world... Not so much.

    Considering I'm using a Quad i7 2.8GHz with 24gig of RAM its not like I lack the horsepower to run this.

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai
    edited September 2016

    @ClintStLaurent thank you for trying out the latest preview of the Inspector.

    It sounds like you're trying to use Google's Android Emulator, which is not yet supported. Recall that the documentation says "Must use XAP or VS Android Emulator".

    Since you are already a VS user, I highly recommend the VS Android Emulator. It is much faster and better than Google's. If you have trouble with it, common troubleshooting tips are here: https://developer.xamarin.com/guides/cross-platform/workbooks/troubleshooting/ .

    Physical Android devices will probably be supported eventually, but as you saw, they are not supported today. Aside from some technical challenges, using a physical device would prevent some features (like view selection) from working as nicely, so for now we've been focusing on the emulator use case.

    Lastly, it is a known issue that our Visual Studio extension does not provide the same useful feedback that our Xamarin Studio extension does when the Inspector is disabled due to an error condition. This will be fixed in a future release.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Trying to get the VS emulator set up now. Major lack of good documentation.
    To get the real performance boost you have to install the intel HAXM driver. Despite my high-end ThinkPad having Intel Virtualization turned on, the HAXM installer says it doesn't have it so HAXM won't install - thus there won't be a big speed boost.

    If I can get the VS emulator working I'll post back.

    FYI: Take a look at Gorilla Player. They seem to be able to talk to a physical device and interact with Visual Studio in real time by making use of a player application on the device and server service on the development PC.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Trying to launch a downloaded and installed "Nexus 7 api 23" Xamarin Android Emulator results in failure because:

    Cannot rename this connection. A connection with the name you specified already exists. Specify a different name

    Well heck... If the connection already exists just use the darn thing. It exists because YOU MADE IT the last time you ran.

    I give up. I've only been a developer for 15 years and deployed hardware and software on 4 continents, successfully completed the XamU certification course, and repaired cryptography equipment for the military - which apparently isn't enough experience to make Xamarin Android Player work.

    A more convoluted, undocumented, "just keep screwing with it until it magically comes to life" system I've never seen.

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    @ClintStLaurent The VS Android Emulator uses Hyper-V. HAXM is actually contraindicated here.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    I rest my case... HAXM is what gives the Microsoft emulator its major performance boost, but somehow we are just supposed to know to not use it here. Yet when you launch the emulator it pops up a message saying that to get the 10x speed boost you need to install it and make a new AVD.

    If I ever made a piece of software that left THIS MUCH to the user I would have been fired.
    The point of making "an installer" is so the people that make the product can set up the end-user's system in such a way is that it works with default configuration/expectations for the majority of users. The Xamarin installer falls far short of this basic function.

    I like Xamarin. I use it at work. We've made some really terrific product with it that runs on 3 platforms with less than 200 lines of platform specific code. As a platform I think its great. But the "get it working" learning curve is tremendously frustrating.

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    @ClintStLaurent said:
    HAXM is what gives the Microsoft emulator its major performance boost, but somehow we are just supposed to know to not use it here. Yet when you launch the emulator it pops up a message saying that to get the 10x speed boost you need to install it and make a new AVD.

    Let me clear up some confusion.

    HAXM and Hyper-V are both hypervisors, and they are mutually exclusive.

    HAXM is nice because it runs on multiple operating systems. This is why Google uses it to accelerate their cross-platform Android emulators.

    Hyper-V is nice because it's already part of Windows. So it's easy to get Microsoft's Android emulator set up on a new machine while installing Visual Studio.

    But you have to pick just one at a time.

    And then there's the Xamarin Android Player, which uses VirtualBox as its underlying virtualization system, and is inherently slower than the hypervisor emulators, especially if you use it while Hyper-V or HAXM are enabled.

    Unfortunately, Inspector and Workbooks don't yet support Google's emulators. This is an obvious missing feature in this preview product and it will eventually be fixed. The rest of the Xamarin suite supports Google's emulators, of course.

    I think you'll be happy if you switch to Hyper-V and the VS emulator. But if you prefer to stick with HAXM and Google, keep your eye open for future Inspector/Workbooks releases.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Nice explanation, most of which I basically knew/understood regarding the various virtualization technologies. I've been a huge fan and user of VMware for years. I use multiple VMware machines at the same time to build/run server based suites so I can watch them all a the same time. So I've run into the conflicts of having to chose between Hyper-V being on/off before.

    The problem(s) I"m running into is actually getting any of XAP or VS players to actually work.
    Most of the time they launch... Display "Android" on the screen and sit there. Or complain about not being able to configure the network (can't add a screen shot here or I would).

    The "Android_Accelerated_x86" without XAML is still a VS emulator, right? It should run but just not x86 accellerated, right?
    Or "Android_ARMv7a Android 6.0"... Again, this is a VS emulator and should work, right? It just sits there with the text "Android" on screen for over 20 minutes. Surely this is not what you meant when you said "better".

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    FYI: I really appreciate the time/attention you're taking to this thread and trying to get me running!

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    I also frequently run Windows in a virtual machine, and have not found a satisfactory way to run an Android emulator in it. Mixing virtualization platforms rarely works well. That is indeed a good case for supporting physical devices, or connections to emulators running on the Mac host.

    For VS Android Emulator network issues, try https://developer.xamarin.com/guides/cross-platform/workbooks/troubleshooting/#Visual_Studio_Android_Emulator_cannot_connect_to_internet .

    I have heard that this works to get the VS Android Emulator working in VMware, but have not tried it myself: https://creativewebspecialist.co.uk/2015/07/22/how-to-use-visual-studio-android-emulator-on-vmware-fusion/

    "Android_Accelerated_x86" sounds like a Google HAXM image. You might want to go to the start menu and find the Visual Studio Android Emulator and make sure you have a device created there.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Patience....

    Wow...

    25 minutes to launch an emulator configured as 10.1" tablet and 512meg of ram.
    8 minutes for Visual Studio to finally deploy to it in debug.
    Only to have the app crash because the app wanted to write its log file to Documents folder - which works fine on physical device. No permissions and no pop-up request to get permission.

    I'm only playing with this emulator because I'm curious about the Xamarin Inspector, and because its 2 weeks to end of quarter and all my work is done ahead of schedule so I have some latitude to experiment with new tech for our department. If I had to actually work like this...

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    So I upgraded the simulator to Android 7 and assigned it a 200mb SD card.
    To the credit of the emulator it launch far faster the second time around, and VS deployed much faster the second time around. Its still feels sluggish... but not to the point where I want to hang my laptop.
    5 minute launch with 1.25 minute deploy.

    Our app looks mostly right... The custom renderers don't seem to work as expected: The fancy tile shape we try to make is just a filled rectangle.

    Oh... **And the Xamarin Inspector button is disabled. ** It doesn't think it can inspect that VS emulator.

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai
    1. Is your app targeting Android 4.0.3 or greater?
    2. Do you have the linker entirely disabled for your app?
    3. In the Android build settings, do you have "Fast Assembly Deployment" enabled?

    If the answer it any of those is "no", fix and try again.

    Otherwise:

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭
    1. Compile against "Latest 7.0", Target against "5.1.1."
      2., 3 - I'll have to check when I go back to the office on Monday.

    Otherwise:
    Absolute latest version of everything v.Wednesday the 14th. - I just went through 3 machines updating everything as part of the latest Xamarin platform update. No stone left unturned.

This discussion has been closed.