Hi all,
I’m currently trying to debug my mobile project on Android, and am having issues.
What seems to be happening is that when I hit my breakpoint while running on the target, the app freezes on the phone (like I’m hitting a breakpoint), but in visual studio, it seems like I’m not hitting a breakpoint at all (no control is passed). My breakpoint is “filled in”, and I’m connecting to the target via VS’s Debug->Attach Unity Debugger-> select phone from dialog method. The app running on the phone hangs until I force quit it (most likely sitting at the breakpoint and awaiting control from VS), but VS doesn’t seem to have any idea that this is the case.
Originally I thought that it may have something to do with my tools, so I updated VS2017 community to its most recent offerings: VS 15.9.12 with Visual Studio tools for Unity 3.9.0.3, but this had no affect. I’m currently on Unity 2019.1.5f1.
Interestingly, I tried to debug a fresh project created with 2019.1.5f1, and I was able to hit my breakpoint on the android target with no issue, so it seems I’ve limited the problem to something to do with my project. The obvious things are set correctly, like a development build and script debugging turned on. This project was originally created a long time ago, and I’ve been upgrading it with Unity over time. I do not recall the last time I’ve successfully debugged an android target with this project, as I’ve mainly been able to get by with looking for exceptions in logcat output.
Anyone run into something like this before?
Thanks,
Davis
Edit: As another data point, if I attach to the target with no breakpoints set, and then set a breakpoint on an Update() call of an object in the current scene, before the breakpoint can resolve to filled, both VS and the target will lock up. VS is totally unresponsive (no clicks or input registering at all), and only resumes normal operation when I force quit the application on the phone.
