I have an app with a keyboard extension, and an iMessages extension. The main app debugs just fine, stops at breakpoints & allows stepping through code. The iMessage extension also works fine. The keyboard extension used to work fine with the debugger but ever since I installed XCode 8 it's been failing. It either fails to reach the breakpoint throwing a SIGABRT / SIGQUIT on thread 1, or it reaches the breakpoint and then crashes on the first 'step over' with a SIGQUIT.
I have Xcode 8.2.1 on OSX Sierra 10.12.3. I've tried my test device, iPhone 6, as well as the simulator. I've rebooted the dev box as well as the device. I've cleared the temporary files and cleaned the build (Shift+Command+Option+K and Shift+Command+K).
Has anyone else had any issues with debugger in XCode 8 and keyboard extensions?
TIA,
Mike
I encountered this bug from new Xcode (8.2.1) project. I found a temporary solution to debug my keyboard.
Run your code like always!
Bring up your keyboard until the error (SIGQUIT) appear!
Goto xcode > debug > detach
Goto again Xcode > debug > Attach to Process: attach the keyboard (it should be first process)
Now, your breakpoints will work. but there are no log output unfortunately!
I hope it temporary solve your problem.
Related
For the past months I have not been able to debug macOS or iOS apps through Xcode. What happens is the following:
Build and run app from Xcode.
Xcode says app is running, but no app has appeared and no debug output from app either.
Kill the process lldb-rpc-server.
App appears and runs as normal, but Xcode is no longer debugging.
Start a new debugging session by attaching it to the app's process.
App freezes again, until lldb-rpc-server is killed.
This OpenRadar has the same description.
I have tried re-installing Xcode (including command-line tools), but it didn't help. Any ideas?
Xcode: Version 9.3.1 (9E501)
MacOS: 10.13.4 (17E199)
The cause of this was that I had installed a GDB/LLDB-extension called Voltron. I was unaware that the installation also created/modified the .lldbinit in the home folder. Removing this file fixed the issue. See also this issue for Voltron.
Got some very good help from Apple.
I had received this warning msg when device was locked and I was running app on device, so when device is unlocked this warning goes
So I upgraded to Xcode 7.3.1 and now my Xcode will build, and deploy my apps (yes every app, even a brand new blank one) to the simulator but the app never launches on the simulator and the debugger never attaches, Xcode just hangs and has to be force quit. I've completely wiped out Xcode and all simulators and re-installed to no avail. I've scoured Stack Overflow and Google trying every piece of advice and still no luck. Anyone anywhere have any idea how to solve this issue? If I downgrade to 7.2.1 I'm able to debug in the simulator just fine.
Let me know if you need more information.
My Apps run just fine on the simulator, and if I try to attach the debugger to a running app it wont and Xcode hangs in the attempt, when attempting to attach this way at least Xcode doesn't have to be force quit.
FYI, I can debug on a device this is only a simulator issue.
I had this same issue, and tried fixing my projects and reinstalled Xcode twice before I was able to get Simulator to crash and give me an error report that called out Cylance. Luckily I have access to administer our Cylance portal, so I was able to work through the issue to narrow down the problem.
Symptoms:
When running an app from Xcode, the Simulator launches but the application does not launch within the Simulator
Trying to stop the application from within Xcode does not work, and generates no messages
Trying to re-run the application from within Xcode generates the following message: ‘An instance of “APPLICATION NAME” is already running. Choose “Stop” to terminate and launch a new instance.’ But pressing Stop does nothing.
Xcode will not quit, and eventually the user must Force Quit to exit Xcode
Within the OS X console, the following messages are displayed:
6/3/16 7:35:38.000 PM kernel[0]: AMFI: com.apple.dt.ins(pid 2239) - [deny-mmap] main process is a platform binary, but mapped executable file is not: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
6/3/16 7:35:38.000 PM kernel[0]: AMFI: com.apple.dt.ins(pid 2239) - [deny-mmap] mapped file has team identifier XXXX: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
Resolution:
The problem is caused by Memory Protection being turned on within the policy assigned to the Mac within the Cylance portal.
To resolve the issue, place the Mac into a zone/policy that does not have Memory Protection turned on. Auto Quarantine and Protection Settings can be left on.
During my testing, I was not able to come up with a list of exclusions that allowed me to leave Memory Protection on, so I ended up disabling it completely.
I create an extension for my app in iOS 8 and it is displayed correctly under the Today tab.
However when I make a change to the extension (either a UI change in the Storyboard, a UI change in viewDidLoad code, or some changes in the widgetPerformUpdateWithCompletionHandler method), there's nothing that is changed when I recompile. The only way I can make the changes to appear is to delete the app from the device/simulator then compile/install again. Restarting XCode (I work with XCode 6 beta 4) / restarting the computer does not help.
How can I fix the bug?
How am I supposed to debug the extension, because setting breakpoints does not seem to do anything and no NSLog messages are printed to the console (I suppose, since it's a different target).
It's a known bug, read the release notes for iOS 8b5.
Debugging (and NSLog) works in Xcode but not always (known bugs). You can still attach the debugger if Xcode cannot attach himself (Debug -> Attach to process)
For me, the simulator works better than real device, so use the simulator until things got better.
2 tips:
Close the simulator at end of debugging (i have a script for auto closing the simulator when i press STOP in Xcode, tell me if you want it).
When you launch the plugin process in simulator, wait for "All applications" display list, if you click "Run" before the list are loaded, the debugger won't attach.
Whenever I build and run just this one particular app in XCode, the UI window of XCode gets pushed back underneath all existing running windows on OSX ( behind the browser and textedit etc...). This means I can't see the Xcode console debug outputs while playing with the app in the simulator. I feel like this could just be a quick setting in xcode or osx but I'm not sure why and how to fix this.
Use Spaces and develop with Xcode in its own virtual window. You will have just Xcode and Simulator wrestling for screen space then.
I normally have at least 5 windows open in Spaces:
Mail and Skype.
Web Browser
Xcode
Terminal/Finder/Odds and sods
Spare
Use Ctrl+Left and Ctrl+Right to switch windows.
I am trying to debug this Mono desktop software in Monodevelop.
I imported the SLN file, ran Build all with success, but when I press the Debug button I get this popup that stays waiting forever saying Waiting for debugger:
The output says:
User assembly '/home/nico/src/SparkleShare/SparkleShare/bin/SparkleShare.exe' is missing. Debugger will now debug all code, not just user code.
My first line of code is a Console.WriteLine whose output does not appear anywhere.
Am I doing something wrong?
Monodevelop 3.0.3.2 on Ubuntu 2012.10.
Nothing special appears on the console with monodevelop -v -v -v.
When I press Start Without Debugging instead of Start Debugging, the app crashes immediately saying The application exited with code: 255, but I need Debug to find where the problem is.
When I press Debug Application... and select bin/SparkleShare.exe, Monodevelop does nothing. The UI does not react in any way, it is like I pressed nothing.
When I run the application from command line, it runs fine (no crash), but Monodevelop does not react in any way, so I can't use it to debug:
mono --debug bin/SparkleShare.exe
Debugging in Monodevelop works fine with a solution created from scratch.
Here is a hack to debug in Monodevelop that works here, but it is quite painful, and unsupported.
Note: It is not the same problem as this question, which is about MonoTouch waiting for a phone simulator... the suggestions over there are about the simulator or updating XCode... no simulator nor XCode here.
MonoDevelop 2.8.6.3 is kinda old.
I recommend you upgrading to 3.x or even the master branch, which has a lot of improvements and probably fixes your issue.