Xamarin iOS debugger not hitting breakpoints - ios

Yesterday morning as I started working on a Xamarin iOS application when my debugger stopped working. I can place breakpoints but as soon as the application starts the breakpoints become hollow like a red donut. I've rebuilt/cleaned project multiple times, I've also wiped obj/bin folders and nothing seems to work. I can't hit breakpoints.
This doesn't happen to all my classes, it looks like it applies to classes where an async function is used however this isn't always the case.
I also get a message in my debugger window which may have only started showing since this bug.
Xamarin.iOS: Successfully received USB connection from the IDE on port 10000, fd: 7
Xamarin.iOS: Processing: 'start profiler: no'
Xamarin.iOS: Profiler not loaded (disabled)
I'm using Xamarin Studio 6.0.1 Build 9 Indie

I have found solution related to this issue: https://stackoverflow.com/a/34211506/4627978.
Also be sure, that you set Debug configuration in Xamarin Studio (not Release, AppStore, etc.) and enable debugging in Project Options > Build > iOS Debug > Enable debugging
After all this don't forget Clean/Rebuild.

I had this same problem and I got it working after changing the iOS project property Linker Behavior to Don't Link.
Make sure you have the iOS SDK updated to what you have in Xamarin.

Here you go with the solution for Visual Studio:
Right-click your project -> Properties
iOS Debug
Enable debugging (and perhaps also Debugging over WiFi)

Related

Unfortunately "app_name" has stopped in xamarin forms

After upgrading to Xamarin 4.3.0.784, my app is crashing every time. And I am getting notification "one or more errors occurred" in Xamarin.Android.common.Debugging.Targets file under GetPrimaryCpuAbi tag.
I did some research about this issue on few days ago, I can give you some tips on the following:
1-try to disable Fast Deployment in android build options(Release Mode).
2-try to disable Shared Shared Runtime in android build options(Release Mode).
3-actually you did not need to enable all architectures check-boxes under Supported architectures.
and if you want to Deal with Startup Crashes, check the following link:
https://developer.xamarin.com/guides/insights/platform-features/advanced-topics/dealing-with-startup-crashes/
and to avoid Xamarin.forms app crashes for unknown reason, try to get latest stable version of Xamarin.forms package from nuget.org.
Finally I found the solution. I opened the project with visual studio, disabled "Use shared runtime", enabled all supported architectures. After restarting, now it is working.

Error debugging the IOS Extensions in Visual Studios Xamarin

The issue I am having is that I can't debug the share extension. I've tried setting break points in the share extension and they are never hit. If I attempt to debug the main app, all works as expected.
This is what I've done. Any help is appreciated!
I tried setting the share extension project as the startup project and I've tried setting multiple projects as startup and then when I run I get the following error:
In the IDE..."Launching Share Extension" and then after a few minutes the error "App has terminated"
Has anyone been successful at debugging an IOS extension using visual studios Xamarin?
As mentioned by SushiHangover, debugging iOS extensions in Visual Studio is available in 4.3.0.550 (RC) and introduced in 4.3.0.405.
As of this writing, 4.3.0.550 is available through the beta channel.
As a note, make sure that your Mac Build Agent is running on the same version.

iOS App starts but is always terminated immediately before app opens

When trying to start an app in debug mode from Visual Studio on a real iOS 10 device, VS will display "Launching app", and then immediately follow up with an "App terminated" message.
No detailed error can be found in the device logs.
I have tried several things, including deleting caches, restarting, reconnecting, rebooting devices and Mac Agent.
I have followed this bug issue to clear caches (https://bugzilla.xamarin.com/show_bug.cgi?id=43239) but with no success.
Also I made sure that all entitlements are correctly described.
After some investigation it turns out that XCode was displaying a tiny message, that this version of XCode was incompatible with the device.
This message is not carried through to Visual Studio.
Update XCode!
Second, possible solution from the bug tracker (https://bugzilla.xamarin.com/show_bug.cgi?id=43239):
Delete contents of
%AppData%\Local\Xamarin\MonoTouch\ on windows machine
$HOME/Library/Caches/Xamarin/XMA on mac machine
Hope this saves somebody else some time.

How to identify iOS app extension crash in Xamarin.iOS?

In my Xamarin project, I have added a new app extension project to the solution.
It is running fine with it's auto generated default code. But when I change something in the MainInterface.storyboard and run again, the extension is not loading; it's crashing with a blink.
I am trying to find the reason for the crash. Since debugging extensions with Xamarin Studio is not possible at the moment, how can I detect the reason for the crash?
You have to use old-school way of debugging things for now, using NSLog or Console.WriteLine
These logs will show up in the Device Log pad in the Xamarin Studio or in System logs if you're testing extensions on simulator

Xcode 4.6 hangs on "Attaching to..." when using LLDB debugger

As the title says, I'm having issues using LLDB. I've looked into this thread Xcode 4 hangs on attaching to (App name) when debugger is set to LLDB and followed the instructions given because I'm having exactly the same issue, and managed to debug by using GDB - it works flawlessly. Anyway, i'm working in a team and I'm the only one who's having this issue, so it's a bit annoying to switch back and forward from GDB to LLDB every time i commit changes so the workaround doesn't get synchronized in the remote repository.
I've checked the compiler, and it's set to LLVM 4.2. In fact, the app compiles perfectly and gets installed in the simulator (i can execute it once I kill and restart Xcode). I would try to reinstall Xcode, but it's a mess since it's a big-sized package and I have a limit on my internet usage, it would take a long while. Does anyone know what's happening here? Is it possible that LLGB is bundled outside XCode, even if I failed to locate it on the system?
Any insight would be appreciated. I can keep the workaround going, it's just that it's a bit annoying given my personal circumstances :-)
EDIT: More details about what I mean by 'hung'. I start with Xcode open, and simulator closed (it doesn't even appear on the Dock). I click 'Run', the simulator is launched successfully, and the application shows the Splash Screen. Then xcode shows the message: "Attaching to ". And now it's hung. You can close the simulator, and xcode is still attaching. Both the Run and Stop buttons stop working. You can try to exit the application by right-clicking on the dock, you get an alert message, and from this point you can't even type code: XCode is fully hung. The only choice here is to kill XCode by using Cmd+Alt+Esc.
This sounds like it could be the problem some folks were seeing in Why does the LLDB Debugger constantly fail to attach? where they'd modified their /etc/hosts file so when Xcode tried to connect to debugserver via "localhost", the connection was never set up.
When Xcode hangs, try switching to Simulator by clicking on its Dock icon. Don't use Cmd+Tab.
Upgrading to XCode 4.6.2 fixed this issue for me

Resources