You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to debug on most android phones (except for a google pixel 4a which always works) from VSCode on Linux then the app shows the splash screen briefly (1 second) and then stops. The debugger is no longer attached. And there are no logs to indicate why.
If you then try and manually launch the app it gets stuck indefinitely on the splash screen, if you then kill the app and relaunch then it works.
Launching the app from the command line also works using:
We have seen this on a varity of Android phones including a bunch of different Samsung devices and Sonim and RugGear devices.
Steps to Reproduce
Load a .NET Maui project that targets Android
Select a real device to deploy to Ctrl-Shift-P -> .NET MAUI: Pick Android Device
Press F5 to start debugging
-> Expected: the APP to launch and be debugging
-> Actual: The splash screen shows briefly and then the app is gone, and the debugger isn't attached.
Did you find any workaround?
Various devs here report that if you keep trying it will work roughly 1 in 10 attempts. It also always works on the Google Pixel 4a
Relevant log output
Output in Terminal that is taken over by VSCode when you press F5 (note this looks exactly the same as on the Pixel 4a that works)
* Executing task: dotnet build -t:Run -p:Configuration=Debug -f net8.0-android -p:AdbTarget=-s%20725EU21J17D00502 -p:AndroidAttachDebugger=true -p:AndroidSdbTargetPort=37133 -p:AndroidSdbHostPort=37133 -p:CustomAfterMicrosoftCSharpTargets="/home/hughesd/.vscode/extensions/ms-dotnettools.dotnet-maui-1.4.36-linux-x64/dist/resources/Custom.After.Microsoft.CSharp.targets" -p:MauiVSCodeBuildOutputFile="/tmp/dotnet-maui/maui-vsc-579cf243-174c-4fc5-8069-55ee23b4ebda.json" -p:AndroidSdkDirectory="/home/hughesd/android-sdk" -p:JavaSdkDirectory="/usr/lib/jvm/java-17-openjdk-amd64" /home/hughesd/work/hydra-src/apps/Xamarin-PTToX/src/Pttox.Forms/Pttox.Forms.csproj
Determining projects to restore...
All projects are up-to-date for restore.
Tait.Threading -> /home/hughesd/work/hydra-src/libs/Tait.Threading/src/bin/Debug/netstandard2.1/Tait.Threading.dll
Pttox.Core -> /home/hughesd/work/hydra-src/apps/Xamarin-PTToX/src/Pttox.Core/bin/Debug/net8.0-android/Pttox.Core.dll
Pttox.Forms -> /home/hughesd/work/hydra-src/apps/Xamarin-PTToX/src/Pttox.Forms/bin/Debug/net8.0-android/Pttox.Forms.dll
Tait.Threading -> /home/hughesd/work/hydra-src/libs/Tait.Threading/src/bin/Debug/netstandard2.1/Tait.Threading.dll
Pttox.Core -> /home/hughesd/work/hydra-src/apps/Xamarin-PTToX/src/Pttox.Core/bin/Debug/net8.0-android/Pttox.Core.dll
37133
Starting Debugger on 127.0.0.1:37133
Start sdb then run the following command
connect 127.0.0.1 37133
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:03.46
* Terminal will be reused by tasks, press any key to close it.
Debug Console in vscode:
This shows that the app exited but contains no other logs at all from the app.
------------------------------------------------------------------------------
You may only use the Microsoft Visual Studio .NET/C/C++ Debugger (vsdbg) with
Visual Studio Code, Visual Studio or Visual Studio for Mac software to help you
develop and test your applications.
------------------------------------------------------------------------------
The program 'Pttox.Forms.dll' has exited with code 0 (0x0).
I have attached logcat output from the run. It also has no actual log output from the app itself but does show ActivityTaskManager and ActivityManager logs for launching the app (search for com.taitradio.unified.pttox)
and try debugging again. That should provide some additional information, though I don't know if that'll be enough to understand why things are failing…
@jonpryor Setting adb shell setprop debug.mono.log all makes it work. But it takes several minutes to clear the splash screen. Could it be a timing issue.
Android framework version
net8.0-android
Affected platform version
vscode 1.94.2, .net80, .NET MAUI vscode extenstion v1.4.36, c# Dev Kig v1.13.9, Ubuntu 22.04.5 LTS
Description
When trying to debug on most android phones (except for a google pixel 4a which always works) from VSCode on Linux then the app shows the splash screen briefly (1 second) and then stops. The debugger is no longer attached. And there are no logs to indicate why.
If you then try and manually launch the app it gets stuck indefinitely on the splash screen, if you then kill the app and relaunch then it works.
Launching the app from the command line also works using:
We have seen this on a varity of Android phones including a bunch of different Samsung devices and Sonim and RugGear devices.
Steps to Reproduce
-> Expected: the APP to launch and be debugging
-> Actual: The splash screen shows briefly and then the app is gone, and the debugger isn't attached.
Did you find any workaround?
Various devs here report that if you keep trying it will work roughly 1 in 10 attempts. It also always works on the Google Pixel 4a
Relevant log output
Output in Terminal that is taken over by VSCode when you press F5 (note this looks exactly the same as on the Pixel 4a that works)
Debug Console in vscode:
This shows that the app exited but contains no other logs at all from the app.
I have attached logcat output from the run. It also has no actual log output from the app itself but does show ActivityTaskManager and ActivityManager logs for launching the app (search for com.taitradio.unified.pttox)
adb.log
The text was updated successfully, but these errors were encountered: