none
Native android debugging on real device

    Question

  • Hi everybody
    First of all I think its great that it is now possible to develop native Android apps with C++ directly in Visual Studio - many many thanks for the effort!
    While I am perfectly able to develop and debug native Android C++ code using one of the Visual Studio Android Emulators, I am facing some trouble debugging on a real device. The code gets compiled and also deployed on the target device yet after deployment an error pops up saying:  Unable to start debugging. Unexpected results from running the Android command 'pwd'.

    I started Visual Studio with the logging flag enabled and searched through the log - but no error or warning is contained. Next, I watched the log on the Android device using adb logcat *:W, yet no warning or error appears. When I call adb shell pwd within a console, / indicating the root directory is returned.

    Despite the error message the apk was fully deployed on the Android device and can be executet, but I need to be able to debug the thing ;-)

    Does any of you guys have any suggestions on what I could try? Don't hesitate to ask if you need more information! :-)

    Thanks for reading and see ya
    Samuel
    Tuesday, March 29, 2016 1:40 PM

All replies

  • Hi Samuel,

    This forum is discuss Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.

    According to your description, your problem is more related to Android development, which belongs to Cross Platform development. So I suggest you post this issue to Cross Platform forum for a better help. Thanks for your understanding.

    https://forums.xamarin.com/categories/cross-platform

    Best Regards,
    Weiwei

    Wednesday, March 30, 2016 6:29 AM
    Moderator
  • Hi Weiwei

    Many thanks for your response! ;-) The link you posted goes to the Xamarin forum - yet I am not using Xamarin. I am using the Visual Studio built in cross platform development tools.

    Best regards
    Samuel

    Wednesday, March 30, 2016 4:55 PM
  • Hi Samuel,

    Xamarin is also can be used in Visual Studio and it mainly used to develop cross-platform application, such as Android, IOS. And some Debug on Device document also provided by Xamarin.

    https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/debug-on-device/

    In MSDN forum, I can't find a forum related to Android development. So I think the Xamarin forum is more appropriate. There should be more experts to help your problem. Thanks for your understanding.

    Best Regards,
    Weiwei

    Thursday, March 31, 2016 2:13 AM
    Moderator