Xcode is detaching from runing process when clicking "Stop Build" - xcode

Since I upgraded to XCode 12, the following situation keeps happening:
When I click "Stop" on a running debug build, the build is being slowly stopped (takes 3-5 seconds), then after it has completed, my app is still running, but detached from XCode.
A workaround that I've found is to add a breakpoint anywhere in the code, then after it's reached, the process seems to attach normally on each subsequent build until I quit XCode. But this is time consuming and does not always work.
I do get this output message:
Message from debugger: The LLDB RPC server has exited unexpectedly.
Please file a bug if you have reproducible steps.
I am running: XCode 12, Catalina, macOS Swift project.
Any ideas? Is there a new setting in XCode that I missed?

Related

Xcode 7.3 wont attach to simulator to debug

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.

XCode crashes everytime I try to run project

Ever since I upgraded to XCode 5, I havent been able to run a project. Every time I hit the play button, XCode immediately freezes, and then crashes a few seconds later. If I press Command+B to build the project, it succeeds, its just running it that causes issues. This is on both iOS and OSX projects.
Here is the crash log it presents after the program closes: https://gist.github.com/EthanArbuckle/7406894
Does anyone have any ideas on how to fix this? Its driving me crazy!
Go to /Applications/Xcode.app/Contents/PlugIns and remove the following directory (take the backup first) IDERepositoryViewer.ideplugin. Quit and relaunch the XCode and it should work fine.

Monodevelop: `Waiting for debugger`

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.

xcode 4.3.2 process hangs

I have run into a rather annoying bug in Xcode 4.3.2.
If you run a process from within Xcode, then stop the simulator directly (outside of Xcode), Xcode still shows the process as running and effectively disables any further interaction with the simulator.
I can't stop the process from within Xcode (no response), and I can't start a new process either as Xcode sees the simulator as being in use. Shutting down the simulator does not notify Xcode either, so I have no option but to shut down Xcode and open it up again But even that does't work as Xcode hangs whilst trying to shut down the process too! So I have to force quit Xcode!
Has anyone found a way round this? I realise I should now only operate the simulator from within Xcode, but I am used to being able to operate the simulator independently.
thanks
I was having similar issues with Xcode 4.3.2. I fixed them by doing the following:
Launch Xcode.
Close any open projects.
Open Organizer.
Delete project form left panel using the gear icon on the bottom left. Select "Remove from Organizer...". This clears all the data about your project that Xcode has cached (indexes, DerivedData, Snapshots, etc.).
5). Re-open project.
Since doing this, my Xcode hanging issues have disappeared.
Here are the steps I follow when this happens:
Start the simulator if it isn’t already running
Choose the option “Reset Content and Settings…” from the iOS Simulator menu
Clean and rebuild the project

Run 2 times for simulator to start - iOS Simulator failed to install the application

Yesterday I finally got everything set up for sending to testflightapp.com and also setup to upload to Apple.
But now when I click on RUN the app compiles and uploads to the simulator and then the window at the top of XCode says "Attaching to myAppName". It hangs at that point. The simulator has nothing on the screen other than the standard desktop.
If I hit RUN the 2nd time, then the app runs right away. So all day I have been hitting run 2 times. Obviously something is wrong, but haven't a clue where to start.
any ideas?
thanks for any help!
**EDIT: Got this from the console after waiting 2 minutes:
8/15/11 10:05:01 PM [0x0-0x18018].com.apple.iphonesimulator[262] MobileInstallationInstall: failed with -1
8/15/11 10:05:01 PM Xcode[143]
Error launching simulated application:
Error Domain=DTiPhoneSimulatorErrorDomain Code=1 UserInfo=0x2028d71c0
"iOS Simulator failed to install the application."**
Yes, i have an idea: Be patient. I have had this too, just wait until the Simulator starts up, 'attatching to ...' means that the Simulator.app is still opening and that xcode is waiting for the Simulator to be fully loaded. So once the simulator is running your app will start to run on the simulator. Just don't close the Simulator.app everytime you have finished running the app, like that you wont have to wait for Simulator to boot up everytime. Also if that still does not work, restart xcode, and simulator or just reboot your mac. Also try deleting your app from the Simulator.
I wound up making a new project copying everything over to the new project. It was easier than spending hours trying to find what change I made :(

Resources