当我在任何项目的事件函数上放置断点时,即使是在我刚刚创建的项目上。我得到:x1c 0d1x
这只发生在Android项目上,在Uwp项目上,它工作得很好。我可以按下继续按钮,代码正常执行和工作,但我不能debbug它,看到局部变量等...
这是我从输出调试中得到的:
04:27:52:817 Start debugging Android application ...
04:27:52:882 \> am start -a "android.intent.action.MAIN" -c "android.intent.category.LAUNCHER" -n "com.companyname.app1/crc64ad68f59cd763e462.MainActivity"
04:27:52:882 \> Starting: Intent { act=android.intent.action.MAIN cat=\[android.intent.category.LAUNCHER\] cmp=com.companyname.app1/crc64ad68f59cd763e462.MainActivity }
04:27:53:583 Resolved pending breakpoint for 'Android.Runtime.JNIEnvInit.RegisterJniNatives(System.IntPtr, System.Int32, System.IntPtr, System.IntPtr, System.Int32)' to /Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNIEnvInit.cs:59 \[0x00000\].
04:27:53:768 Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointSendToIde(System.String)' to D:\\a_work\\1\\s\\HotReload\\Source\\Xamarin.HotReload.Agent\\HotReloadAgent.cs:423 \[0x00000\].
04:27:53:768 Loaded assembly: /data/data/com.companyname.app1/files/.__override__/System.Core.dll \[External\]
04:27:53:842 Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointCheckpoint()' to D:\\a_work\\1\\s\\HotReload\\Source\\Xamarin.HotReload.Agent\\HotReloadAgent.cs:418 \[0x00000\].
04:27:54:209 Resolved pending breakpoint at 'MainPage.xaml.cs:23,1' to void App1.MainPage.ListView_ItemSelected (object sender, Xamarin.Forms.SelectedItemChangedEventArgs e) \[0x00000\].
04:27:54:266 \[ompanyname.app1\] Late-enabling -Xcheck:jni
04:27:54:266 \[ompanyname.app1\] Unexpected CPU variant for x86: x86_64.
04:27:54:266 \[ompanyname.app1\] Known variants: atom, sandybridge, silvermont, kabylake, default
04:27:54:266 \[CompatibilityChangeReporter\] Compat change id reported: 171979766; UID 10160; state: ENABLED
04:27:54:266 \[ziparchive\] Unable to open '/data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/base.dm': No such file or directory
04:27:54:266 \[ziparchive\] Unable to open '/data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/base.dm': No such file or directory
04:27:54:266 \[nativeloader\] Configuring classloader-namespace for other apk /data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/base.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/lib/x86_64:/data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/base.apk!/lib/x86_64, permitted_path=/data:/mnt/expand:/data/user/0/com.companyname.app1
04:27:54:266 \[debug-app-helper\] Checking if libmonodroid was unpacked to /data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/lib/x86_64/libmonodroid.so
04:27:54:266 \[debug-app-helper\] Native libs extracted to /data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/lib/x86_64, assuming application/android:extractNativeLibs == true
04:27:54:266 \[debug-app-helper\] Setting up for DSO lookup in app data directories
04:27:54:266 \[debug-app-helper\] Added filesystem DSO lookup location: /data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/lib/x86_64
04:27:54:266 \[debug-app-helper\] Using runtime path: /data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/lib/x86_64
04:27:54:266 \[debug-app-helper\] checking directory: `/data/user/0/com.companyname.app1/files/.__override__/lib`
04:27:54:266 \[debug-app-helper\] directory does not exist: `/data/user/0/com.companyname.app1/files/.__override__/lib`
04:27:54:266 \[debug-app-helper\] Checking whether Mono runtime exists at: /data/user/0/com.companyname.app1/files/.__override__/libmonosgen-2.0.so
04:27:54:266 \[debug-app-helper\] Checking whether Mono runtime exists at: /data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/lib/x86_64/libmonosgen-2.0.so
04:27:54:266 \[debug-app-helper\] Mono runtime found at: /data/app/\~\~vxvxmj4IAS5O-va-n9FSyg==/com.companyname.app1-gxyJ-4maXtBZ-u-E90kDvA==/lib/x86_64/libmonosgen-2.0.so
04:27:54:266 \[ompanyname.app1\] Attempt to remove non-JNI local reference, dumping thread
04:27:54:266 \[monodroid\] Creating public update directory: `/data/user/0/com.companyname.app1/files/.__override__`
04:27:54:266 \[ompanyname.app1\] Attempt to remove non-JNI local reference, dumping thread
04:27:54:266 \[monodroid-debug\] Trying to initialize the debugger with options: --debugger-agent=transport=dt_socket,loglevel=0,address=10.0.2.2:51546,embedding=1
04:27:54:266 \[monodroid-gc\] GREF GC Threshold: 46080
04:27:54:266 \[ompanyname.app1\] Attempt to remove non-JNI local reference, dumping thread
04:27:54:266 \[ompanyname.app1\] Symbol file LoadedFromMemory is not a mono symbol file
04:27:54:266 \[libEGL\] loaded /vendor/lib64/egl/libEGL_emulation.so
04:27:54:266 \[libEGL\] loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
04:27:54:266 \[libEGL\] loaded /vendor/lib64/egl/libGLESv2_emulation.so
04:27:54:266 \[ompanyname.app1\] Accessing hidden method Landroid/view/View;-\>computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
04:27:54:266 \[ompanyname.app1\] Accessing hidden method Landroid/view/ViewGroup;-\>makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
04:27:54:266 \[CompatibilityChangeReporter\] Compat change id reported: 210923482; UID 10160; state: ENABLED
04:27:54:266 Thread started: #2
04:27:54:266 Thread started: #3
04:27:54:266 Thread started: #4
04:27:54:328 Loaded assembly: /data/data/com.companyname.app1/files/.__override__/System.Runtime.Serialization.dll \[External\]
04:27:54:328 Loaded assembly: /data/data/com.companyname.app1/files/.__override__/System.ServiceModel.Internals.dll \[External\]
04:27:54:390 \[monodroid-assembly\] open_from_bundles: failed to load assembly Xamarin.Forms.Platform.Android.AppLinks.dll
04:27:54:390 \[CompatibilityChangeReporter\] Compat change id reported: 171228096; UID 10160; state: ENABLED
04:27:54:452 Thread started: #5
04:27:54:452 \[HostConnection\] createUnique: call
04:27:54:452 \[HostConnection\] HostConnection::get() New Host Connection established 0x6ffd329587d0, tid 18462
04:27:54:452 \[HostConnection\] HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2
04:27:54:452 \[OpenGLRenderer\] Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
04:27:54:452 \[OpenGLRenderer\] Failed to initialize 101010-2 format, error = EGL_SUCCESS
04:27:54:452 \[EGL_emulation\] eglCreateContext: 0x6ffd32959250: maj 2 min 0 rcv 2
04:27:54:515 \[EGL_emulation\] eglMakeCurrent: 0x6ffd32959250: ver 2 0 (tinfo 0x6fff4e8ed080) (first time)
04:27:54:515 \[Gralloc4\] mapper 4.x is not supported
04:27:54:515 \[HostConnection\] createUnique: call
04:27:54:515 \[HostConnection\] HostConnection::get() New Host Connection established 0x6ffd329593d0, tid 18462
04:27:54:515 \[goldfish-address-space\] allocate: Ask for block of size 0x100
04:27:54:515 \[goldfish-address-space\] allocate: ioctl allocate returned offset 0x3f3ffe000 size 0x2000
04:27:54:515 \[Gralloc4\] allocator 4.x is not supported
04:27:54:515 \[HostConnection\] HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_2
04:27:54:577 \[Parcel\] Expecting binder but got null!
我使用的是Visual Studio Community 2022 64位。版本17.6.2
我不认为这是相关的,但它开始这样做,因为我更新到17.6.0(不正确的 bat ,但好吧,我给尽可能多的信息,我可以)
它必须是我的配置上的东西,因为它只发生在我点击一个列表视图项目或其他(没有真正尝试其他)。当我在程序的开始处放置断点时,正常的行为发生。
- 我试着清理解决方案,删除每个项目上的bin和obj。重建他们。
- 重新安装visual studio,所有的sdk,我的模拟器。
- 在不同的模拟器上尝试。
- 使用android上的快速部署properties -> android options -> Packaging properties-安装了Xamarin.AndroidX.Work.Runtime 2.7.0。
- 检查了文件名、目录等,但即使没有空格或特殊字符,仍然会发生
- 在其他计算机上尝试
1条答案
按热度按时间fd3cxomn1#
我也遇到了同样的问题,原来是因为断点在主线程上。
我把我试图中断的代码移到另一个线程,然后它就工作了。它最近必须更改,这样您就不能中断到主线程上运行的代码。