I have a stumper. How can I get my Xcode debugger to provide an output under the following circumstances?
I tried restarting my iMac. I tried restarting Xcode. I tried restarting my simulator.
I am looking at the proper debugger panel:
I have tried "activating the debugger."
I do have code that should produce an output as well.
The app does run in the simulator.
No crash report or popover warningis provided.
Just tried running on a device. This is a partial answer/fix. The debugger works when running on the device.
Related
we all know that if we build and run an app from XCode, we can see all the debugging, but what if we want to debug an app preinstalled on iPhone Simulator, I can't seem to find a way to do this, is this possible? how?
I tried iOS Console, but it doesn't seem to even work, the beta has expired.
thanks
If you just want to see the log output (e.g. NSLog()), see the following answer explaining where to find the simulator's system.log file.
https://stackoverflow.com/a/10165649
Note that if you are using Swift, "print" statements will not be written to the log file; they will only be displayed in Xcode's console.
the best way for me was
tail -f /Users/userName/Library/Logs/CoreSimulator/appID/system.log
it prints all data into mac terminal even though if you are not running the app from XCode or something, I wish I knew that before...
I just updated to Xcode 7 and ran an app on a live device. Now for some reason, I get an error when I try to run an app in a simulator.
Stop “(null)”?
An instance of “(null)” is already running. Choose “Stop” to terminate and launch a new instance.
When I press the stop button it grays out, as in the screen shot, but nothing happens. I have tried resetting the content and settings on the simulator, but that didn't help.
Getting this as well with Xcode 7.
I've been following these simple steps to avoid seeing the error:
Build your app.
Run your app.
Annoying, and not a solution, but I think this is a bug within Xcode 7.
Completely quitting Xcode 7 and reloading resolved the simulator is already running it for me.
I got this error too, and building and then running the app (cmd+b ; cmd+r) solved the problem.
TL;DR: This is a recurring error in XCode 7 with no known solution. To get rid of it, disconnect your device, then reconnect and carry about your day. If running the simulator, kill it, then restart it. Hopefully Apple addresses this soon.
When you get like this stop (CMD+.)the stop the project.
->Quit Xcode
->Clean the project (CMD+Shift+K)
->Build the project(CMD+B)
->Run the project(CMD+R)
If you are running on an actual device, I found that by disconnecting the device (iphone) from the computer/laptop and reconnecting eliminates this error/issue.
However, I still see in xcode the following message:
running <app name> on <phone name>
But at least I do not need to quit xcode.
I did not have this when running on a simulator (always testing on a real device...)
I suggest building your app and then cleaning it. For me, this ensured that later on I could just run the application.
I'm using Xcode 6.1 and running an app on the Simulator. When the app exits by double-tap home button, no logs show any more from Xcode console when I come back to the app. Anyone knows what's going on. Appreciate
You need to launch (run) the app from Xcode into the simulator in order to get Xcode's debugger to attach and stream the simulator's console output into the debugger window.
You can also view the Simulator console output by looking at a system log file, details for which can be found in this related question.
No app can run in my simulator, although building is good.
Error messsage is below:
Unable to run app in Simulator
An error was encountered while running (Domain = NSPOSIXErrorDomain, Code = 3)
In my case, I tried to run the app on a iPhone 6 simulator when I got this error. Quitted the simulator only and re-ran the app on iPhone 5s (8.1) - it worked fine.
After a while I changed the target back to iPhone 6 (without quitting it), and ran the app against it - no error shown.
As mentioned in the Xcode 6.1 Release Notes and in my sticky post in the Apple Developer Forums for the iOS Simulator, this is a known bug in iOS.
Upon installation of an app, SpringBoard will SIGKILL that app's
process in order to force a relaunch of the app with the new
executable. The problem is that there is a race condition whereby
SpringBoard may accidentally SIGKILL a new process that we just
launched rather than the old process. Which of the various error
messages you get depends on exactly when in the launch process the
SIGKILL was delivered. Normally, this shouldn't happen, so the advise
is to just try again (sorry =/). If you find that this happes to you
all the time or more frequently than you can tollerate, we are
incredibly sorry. We are aware that systems with slower disk I/O will
see this happen more frequently than faster systems, so if you are
using an NFS home directory, you may want to create a local directory
for your simulator data and setup a simlink to it from
~/Library/Developer/CoreSimulator
By Quitting the Simulator and Run the application worked for me.
For me , just Reset Content and setting in your simulator
Restart Mac can solve the problem for me.
This error is less severe than "Domain = DTiPhoneSimulatorErrorDomain, Code = 2" error that I had when I switched to Xcode 6.
For this one, I just reset and cleared contents on my Simulator...quit. Rebuilt and ran my app...and it works.
Every time this has happened to me (as of this writing, still happening on Xcode 6.1) I do not need to restart my mac to fix it. Instead I only had to restart the simulator. I exit the simulator by right-clicking on its icon in the tray and selecting the option to Quit. The I re-run my app and the simulator starts from scratch and runs my app with no error. Much quicker than re-starting the mac.
Well, I had the same error popping up, but since I force quitted the simulator then ran the project again I got it fixed and running fine. Hope that helps you :)
If this error occurs with ionic framework, make sure you have an app id given in your config.xml
This is a generic error which says that it is unable to launch the app. The real error is in the log file. Go to the Simulator menu, Debug / Open System Log. Then press Reveal button to open the folder with actual Simulator logs. In my case it was CoreSimulator.log.
Here you will find the real error. My error was Could not register service com.apple.gputools.agent.producer.sim .
After a lot to struggle and trying all suggestions for half a day, I just went to simulator menu and chose File / GPU Selection / Use External GPU when available. That's it.
please download new xcode_6 beta 4. your project will work in simulator. As i have tested as well.
Sometimes the beta version of XCode is wrongly configured to use the command line tools from the previous xcode version.
This solution should fix the issue for you : https://stackoverflow.com/a/25415781/512504
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