Post

Replies

Boosts

Views

Activity

Why are breakpoints in Xcode not showing source code now?
I have recently started to experience the debugger not stopping at breakpoints and showing source files. Instead it shows the assembly instructions and it seems to have started happening for others on my team. I thought maybe it was a setting somewhere in our projects so I created a new project with unit tests and even it does not work normally. The only recent change has been to do debugging with iOS 14 while using Xcode 11.3 due to still having some projects using Swift 4. We've copied the Device Support from the latest version of Xcode to run the app on the device. I have also tried debugging with an iPhone 6s running iOS 12 and also with the Simulator while running unit tests. In every case on this Mac I am not able to get source files to be displayed when the debugger stops at a breakpoint. And I have also tried running test unit tests for this project with Xcode 11.5. It also does not work. What could be preventing it from working?
1
0
7.9k
Sep ’20
How can I use xcdebug?
I started a Mac app which I just built with Xcode. I quit it from Xcode and started it from the dock. Now I have the process ID but this command does not work. xcdebug --pid 1234 Run xcdebug -h shows the help text but does not show the commands which are supported. There are no docs found on the developer site either.
1
0
824
Mar ’22
Access dot folder file from macOS app with App Sandbox
This macOS app needs to access a file which is located in a custom dot folder (~/.folder/file) but it is not clear how this should be done. Below are a few options I have considered. Request Permission Have the app request permission from the user with the path predefined. Then I expect I would need a security-scoped bookmark to retain access across app launches. Is it possible to predefine the path or does the user have to use a Finder window to select the file? Agent An agent could read the file and use XPC to communicate with the app. Perhaps this may have different access than a full a macOS app though there are not examples which I could follow for this use case. Command Line Tool The app installer could include a tool which the macOS app runs via shell and it would have the access that is needed. It would output JSON to stdout which can be read in with Swift/Codable. Using a shell to run a command may not allow access though. It would likely have the same restrictions as the app itself. Access to a single file is all I need for now. I would like the option to access all contents of a folder for other use cases, so any API which allow that to work would be appreciated as well. What is the best way to do this? Related: Sandbox file access
5
0
2.1k
Jun ’22