In Xcode when I run my project it gets stop automatically soon after started running. This is happening when I keep a breakpoint for some code. The weird thing is that, it is happening for a some particular class only. If I enable a breakpoint in other classes then it is running and working fine. I am not able to run Xcode and debug with the issues.
I tried to fix this issue by clearing all the breakpoints and quit the Xcode and run it again. But as soon as I enable breakpoint in that particular class Xcode again got stopped.
I am totally blank in figuring out the problem for this issue. If any one has come across with this issue kindly share your experience to resolve this. Currently I'm using Xcode 10.2. Thanks in advance..
For certain code, this happens. This is a known issue and I had submitted a bug report. For the time being, use print statements and add breakpoints before and after the issue code path. The problem is with the lldb rpc server crashing, which exits the debug mode. You can find it in the issue crash log under ~/Library/Log/DiagnosticReports folder.
Related
I have read some articles like app freeze with BKSendHIDEvent error:
iOS 9 App freeze with console log "BKSendHIDEvent", but my problem is slightly different from this one. Since I use ionic to build the ios app, I don't know how to trouble shoot the detailed error in xCode.
My problem is that when the app first runs within the xcode, everything works fine, but if I stop the debug and reopen the app from the simulator, no button responses at all. The whole app stucks at this stage.
I checked the simulator system log, it shows this:
BTW, when I kill the app(flick up the app) while it is still debugging, the xcode says this, I don't know if this was the issue:
I have also tried to get further information from the web inspector, but this does not response either. I could not reload the page by
window.location.reload();
There are no window object at all...:
So I'm totally lost here. I don't know how to further trouble shoot this error. Can anyone please point me to a correct direction? I have no idea why the web inspector shows nothing here and how to get the detailed error info in xCode.
Thanks in advance!
After several search, here is the fix:
App Freeze
But I still do not know how to trouble shoot, in the issues above, they mentioned race condition, how to debug this?
Xcode 6 won't build when I run simulator on mac or on my own ipad...
The last run in failed to build because of an error, which I fixed. Yet the error message, telling me that addObject is not a member, which clearly nonsensical, still remains in the code. I rewrote the code around the error and nothing is making it disappear, not restarting Xcode or my computer has helped either. I assume this has something to do with the crash.
Any idea what I can do?
For the error in the code, hit command+shift+k to clean your project. This might fix your problem.
If it still occurs, even after rebooting and restarting Xcode I'd recommend to reinstall Xcode completely: deinstall it first (using CleanMyMac for instance) and then download and install it.
Hope this helps :)
I got a warning in Xcode 5.01 indicating that I needed to validate components. I clicked the button to do the validation and since then my app doesn't actually start on the simulator. I know I'm being vague but I do recall a message about validating components.
Xcode says the app is running on the simulator but I don't see my app ever appearing on the simulator any more.
I've cleaned the app and reset the simulator. I put a breakpoint in main.m but it never executes. And the breakpoint buttons to step into, over, etc are not highlighted so it is as if it has not reached the main.m breakpoint.
I also don't see any messages in the debug console.
Any idea what happened and what I can do?
Thanks
Ok, the problem was that the app had added arm64 when it did a Validate Project. However, I had an API, that I think only supports 32-bit. So I followed the instructions here which resolved the problem.
I've been struggling with an weird issue for some time now. When running my app with the iOS Simulator initially closed it launches correctly. But if I then run it again without closing the simulator it crashes and just prints (lldb) in the error log. If I then run it again (without closing the simulator) it launches correctly. And if I do the same again it crashes. So it seems to be every second time. It works when using a iOS device and I have a college with the exact same project who doesn't experience this problem in the iOS Simulator. What I've tried is cleaning, reset contents and settings, manually removing the app, restarting my computer and reinstalling Xcode.
There's an issue with OS X 10.8.4 that causes random simulator crashes.
https://devforums.apple.com/message/817179#817179
A couple of workarounds have been suggested, including switching to GDB. See here:
We have found the issue. It is a process killing race condition in
"debugserver" when it is killing the application it is debugging which
causes this problem to occur.
The work around that should work for
all folks is to kill the app first, wait for it to go away, then hit
CMD+R. The quick turn around of just pressing CMD+R is now showing
this thread race condition more often in 10.8.4.
Apple resolved this issue in June 13th, 2013 build:
Yes, I meet it too. In Product -> edit scheme change the debugger from lldb to gdb. Can simply solve it. Hope Apple can fix it asap.
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