Graphical Debugger

RSS for tag

Debug your app directly within the Xcode editor using Graphical Debugger.

Graphical Debugger Documentation

Posts under Graphical Debugger tag

43 Posts
Sort by:
Post not yet marked as solved
1 Replies
801 Views
Can anyone help and provide guidance on how to add debug buttons to the Touch Bar?According to the Help text, it should be possible to customize teh Touch Bar, but I am unable to get this to work at all. The options shown when I View -> Customize Touch Bar are very limited, and do not give me options to add Debug related buttons.Thanks.CUSTOMIZE XCODECustomize the Touch Bar controlsCustomize the Touch Bar controls for the source editor, Playground editor, Interface Builder, view debugger, and memory graph debugger.Open the desired editor or debugger.Choose View > Customize Touch Bar.Add, rearrange, or remove a button in the Touch Bar.Add a button: Drag a button from the screen to the Touch Bar; buttons in the Touch Bar jiggle slightly.Rearrange a button: On the Touch Bar, drag a button do the desired location.Remove a button: Drag a button from the Touch Bar to the screen.On the Touch Bar, tap Done.
Posted
by
Post not yet marked as solved
3 Replies
2.5k Views
environment: macOS10.15.5 (19F101) and xcode11.4.1crash: when my applicatopn debug or export IPA is running on the iPhone, when I forcibly quit the operation, there will be an abnormal crash, the log is as followsThread 0 Crashed: 0 libsystem_kernel.dylib 0x0000000187c3ad88 __pthread_kill + 8 1 libsystem_pthread.dylib 0x0000000187b531e8 pthread_kill$VARIANT$mp + 136 2 libsystem_c.dylib 0x0000000187aa6644 abort + 100 3 libsystem_malloc.dylib 0x0000000187b40ba0 _malloc_put + 0 4 libsystem_malloc.dylib 0x0000000187b40d58 malloc_report + 60 5 libsystem_malloc.dylib 0x0000000187b3608c free + 536 6 libc++.1.dylib 0x0000000187cbd16c std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator >::~basic_string() + 32 7 libsystem_c.dylib 0x0000000187a874c8 __cxa_finalize_ranges + 384 8 libsystem_c.dylib 0x0000000187a877d8 exit + 24 9 UIKitCore 0x000000018bef58f0 -[UIApplication terminateWithSuccess] + 0 10 UIKitCore 0x000000018b695b14 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 124 11 UIKitCore 0x000000018b69579c -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 216 12 UIKitCore 0x000000018beeb98c -[UIApplication workspaceShouldExit:withTransitionContext:] + 212 13 FrontBoardServices 0x000000018cfb8490 -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:] + 84 14 FrontBoardServices 0x000000018cfe35ac __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke_2 + 76 15 FrontBoardServices 0x000000018cfc97ec -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 232 16 FrontBoardServices 0x000000018cfe353c __83-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:withAcknowledgement:]_block_invoke + 124 17 libdispatch.dylib 0x0000000187b0b524 _dispatch_client_callout + 16 18 libdispatch.dylib 0x0000000187ab4434 _dispatch_block_invoke_direct$VARIANT$mp + 224 19 FrontBoardServices 0x000000018d008440 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40 20 FrontBoardServices 0x000000018d00810c -[FBSSerialQueue _queue_performNextIfPossible] + 404 21 FrontBoardServices 0x000000018d008634 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 22 CoreFoundation 0x0000000187dc3b64 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24 23 CoreFoundation 0x0000000187dc3abc __CFRunLoopDoSource0 + 80 24 CoreFoundation 0x0000000187dc3244 __CFRunLoopDoSources0 + 184 25 CoreFoundation 0x0000000187dbe274 __CFRunLoopRun + 788 26 CoreFoundation 0x0000000187dbdc34 CFRunLoopRunSpecific + 424 27 GraphicsServices 0x0000000191f0738c GSEventRunModal + 160 28 UIKitCore 0x000000018bef022c UIApplicationMain + 1932 29 xxxxxxx 0x0000000104d7e09c main (main.mm:32) 30 libdyld.dylib 0x0000000187c45800 start + 4but the same project running on macOS10.15 (19A583) and xcode11.3 (11C29) No problemso did the system update to upgrade some configurationthank you!!!
Posted
by
Post marked as solved
1 Replies
4.6k Views
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?
Posted
by
Post not yet marked as solved
1 Replies
505 Views
When I select the "all" option for which variables to show my global variables don't show up. I've got a set of arrays that are used to store data that are globally available. But when I'm in a routine that uses them they don't show up in the debugging window. There might be a bug because once they did show up but that was only once. I know the variables exist and are in scope since the method uses them and works just fine. Thanks for any help. I'm using Xcode 12.1
Posted
by
Post not yet marked as solved
0 Replies
346 Views
I'm at a state where, on my iPhone, my App's Shared Group Container Directory is Using 303 KB, Documents Directory is Using 16 KB, Temporary Directory is Empty, and, Caches Directory is using 295 KB. Yet, for some reason my iPhone's Settings App > General > iPhone Storage, seems to think that my app's "Documents & Data" is using 191.9 MB. What gives? I have tried everything I could think of here. I tried downloading my app's container to my Mac using Xcode. I have even tried re-booting my iPhone, and force-quitting & restarting the iOS Settings app. None of these have offered a hint. Is there something I'm missing here? How exactly does the system calculate "Documents & Data" disk usage? Is there anyway to know what using this disk space?
Posted
by
Post not yet marked as solved
2 Replies
1.1k Views
What I already did: Mac / target restarted Devices unpaired Library/Developer removed Xcode 12D4e (Appstore) reinstalled - latest for Catalina How to reproduce the error: Empty iOS project (Hello World) Select a physical device (it works fine in the simulator) Product --> Run Debug --> View Debugging --> Capture View Hierarchy Result: Error:    Unable to Capture View Hierarchy. Details:  Log Title: Data source expression execution failure. Log Details: error evaluating expression “(id)[[(Class)objc_getClass("DBGTargetHub") sharedHub] performRequestWithRequestInBase64:@"…"]”: error: Expression can't be run, because there is no JIT compiled function Log Method: -[DBGDataSourceConnectionLibViewDebugger _executeLLDBExpression:forRequest:onPotentialThread:iteration:]_block_invoke Method:   -[DBGViewDebugger _initiateInitialRequestWithDataSourceVersion:]_block_invoke Environment: Xcode 12.4 (12D4e) debugging iPhone X (Model A1865, A1901, A1902, A1903) iOS 14.7.1 (18G82). Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide. Has anyone this problem too?
Posted
by
Post not yet marked as solved
2 Replies
480 Views
There are two problems which have an one root. I present ViewController modally and it has UITextView in ScrollView, when I call dismiss it, right after that, the text on UITextView is erasing This bug affects on following solution, describing here https://stackoverflow.com/questions/50011682/handling-scroll-views-with-custom-interactive-view-controller-presentation-an And If I uncomment following code, and use Custom modal transition, describing on article above, I will get that every time when I touch the ChildViewController and moving the finger, the UITextView will be empty on screen, and when I unthouch screen, the text will be shown on screen. class ChildViewController: UIViewController {     private let descriptionTextView: UITextView = {         let tv = UITextView()         tv.font = .systemFont(ofSize: 15)         tv.isSelectable = true         tv.textContainer.lineFragmentPadding = .zero         tv.textContainerInset = .zero         tv.isEditable = false         tv.isScrollEnabled = false         tv.isUserInteractionEnabled = true         tv.dataDetectorTypes = .link         tv.bounces = false         tv.backgroundColor = UIColor(hue: 0.2, saturation: 0.8, brightness: 0.9, alpha: 1)         tv.text = "There are two view controllers: ViewController and TextViewController. Both view controllers are showing a UITextView and a button. I've created a segue called \"textSegue\" when I press the \"Text\" button on the ViewController the text is passed to the TextViewController and displayed. On the TextViewController I can select the text and press the 'Bold' button to make the text bold. When I press the \"Back\" button, the TextViewController is dismissed and the ViewController will show the attributed text. The problem is, when I press the \"Text\" button again and the TextViewController shows, the text in the UITextView doesn't show the attributed text (it is'n bold anymore)."         tv.translatesAutoresizingMaskIntoConstraints = false         return tv     }()     private lazy var scrollView: UIScrollView = {         let scrollView = UIScrollView()         scrollView.bounces = false         scrollView.translatesAutoresizingMaskIntoConstraints = false         scrollView.backgroundColor = UIColor(hue: 0.2, saturation: 0.8, brightness: 0.9, alpha: 1)         return scrollView     }()     override func viewDidLoad() {         super.viewDidLoad()         view.backgroundColor = UIColor(hue: 0.2, saturation: 0.8, brightness: 0.9, alpha: 1)         view.layer.cornerRadius = 24         view.addSubview(scrollView)         scrollView.addSubview(descriptionTextView)         addDismissButton()         NSLayoutConstraint.activate([             scrollView.topAnchor.constraint(equalTo: view.topAnchor, constant: 24),             scrollView.bottomAnchor.constraint(equalTo: view.bottomAnchor),             scrollView.leftAnchor.constraint(equalTo: view.leftAnchor),             scrollView.rightAnchor.constraint(equalTo: view.rightAnchor),             descriptionTextView.topAnchor.constraint(equalTo: scrollView.topAnchor),            descriptionTextView.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor),             descriptionTextView.leftAnchor.constraint(equalTo: scrollView.leftAnchor),             descriptionTextView.rightAnchor.constraint(equalTo: scrollView.rightAnchor),             descriptionTextView.widthAnchor.constraint(equalTo: scrollView.widthAnchor),         ])     }     private func addDismissButton() {         let button = UIButton(type: .system)         button.setTitle("Dismiss", for: .normal)         button.addTarget(self, action: #selector(dismissSelf), for: .touchUpInside)         view.addSubview(button)         button.translatesAutoresizingMaskIntoConstraints = false         NSLayoutConstraint.activate([             button.centerXAnchor.constraint(equalTo: view.centerXAnchor),             button.bottomAnchor.constraint(equalTo: view.bottomAnchor),             button.widthAnchor.constraint(equalToConstant: 200),             button.heightAnchor.constraint(equalToConstant: 80),             ])     }         @objc func dismissSelf() {         self.dismiss(animated: true)     } } class ParentViewController: UIViewController {     private let transition = PanelTransition()     @IBAction func openDidPress(_ sender: Any) {         let child = ChildViewController() //        child.transitioningDelegate = transition //        child.modalPresentationStyle = .custom         child.modalPresentationStyle = .fullScreen                present(child, animated: true)     } } And If I uncomment following code child.transitioningDelegate = transition child.modalPresentationStyle = .custom, and use Custom modal transition, describing on article above, I will get that every time when I touch the ChildViewController and moving the finger, the UITextView will be empty on screen, and when I untouch the screen, the text will be shown on screen. And I could catch this on View Debuger, and text is existing in UITextView, but on screen is not. Is It bug on UITextView?
Posted
by
Post not yet marked as solved
1 Replies
473 Views
I recently found that when I run an app on an iPhone, if I swipe from the right edge, these tools will show on the screen. But they won't show if I run other apps. I have no idea how to enable this function, and I can't find relevant information on the internet. I'm using XCode 13.1 and iOS 15.1.
Posted
by
Post marked as solved
1 Replies
462 Views
This seems like a very basic question but I couldn't find an answer to this yet: I have a simple C++ command-line application which has its main() thread and from this it forks a service pthread (BSD thread). This service thread performs the I/O on the console. When I just let it run, it works as expected. The question is: I would like to pause and single-step only the main() thread while the service thread continues to run free in the background, but so far the Xcode debugger insists on always pausing or resuming all threads at the same time, apparently (regardless whether the pause was due to clicking the pause icon or hitting a breakpoint in either thread). Have I overlooked something or is it in fact impossible in Xcode to pause and single-step only one of the threads in a Mac application? (I'm not questioning that in most cases the observed behaviour is the desired and most practical one, I'd just need single-thread debugging right now.)
Posted
by
Post not yet marked as solved
1 Replies
805 Views
Hello everyone. I have an issue with an iOS react-native app after the iOS 15 upgrade but with not a crash. If someone opens the app after ~1 hour from the last time he/she opened it, the app skips the SplashScreen, and after that nothing renders correctly. The positioning and order of components are wrong. also only happens in some devices like iPhone 12 pro max running 15.1.1  any help would be highly appreciated I'm counting on these forms other than that there is no way to debug such an issue or to put any log because even log will not identify issue
Posted
by
Post marked as solved
1 Replies
629 Views
I'v searched and it seems all the answers are from are from many years ago. I'm working on a network security command line research tool for Linux/Mac that currently uses a Makefile. I wanted to use the Xcode debugger, so I tried to build an Xcode project, but I'm having some final difficulties. I created a new project of type command line tool with external build target in the project directory. The default was to use /usr/bin/make. It ended up in a subdirectory, and based on several older web resources, I moved the project file up to the folder with the makefile. I added the source files in the folder to the project and right now I can edit and build from Xcode without difficulty. The issue is that the final executable ends up in a subfolder called bin, and I can't seem to discover how to tell Xcode that that is the final executable. All of the resources I've found talk about adding a custom executable to the target from the project menu, but that menu no longer exists. Searching project help doesn't seem to point to any setting for the executable produced by an external build process. The closest build setting I could find was PROJECT_NAME, but changing that didn't seem to help. Thanks.
Posted
by
Post not yet marked as solved
2 Replies
287 Views
Let’s say you’re in Xcode and you’re working on a project with like 50 different story boards with a large team. There is one particular view controller that you found in Xcode, but you can’t find while navigating through the physical app. You decide to go into Xcode to see what calls that view controller so that hopefully it can help direct you on how to navigate to it, but you have no luck. The next step you try is setting up break points in the view controller .Swift file (maybe the viewDidLoad function) with hopes that while swiping through the app on a physical device (or simulator) you might hit a breakpoint, essentially telling you that you have landed on the view controller you are looking for. However, the app is so large that and you still can’t manage to find the screen. Long story short, it would be very helpful if there was some type of functionality that every single storyboard file has a “backtrack” area where are you can quickly look at every file that actually calls it. This way you can backtrack so much easier. Every time you create a new file that segues into that story board, that story board should update it’s “backtrack” section. Maybe call it some thing like storyboard backtrack, or breadcrumbs. Or whatever… It will make debugging so much easier and a lot less time-consuming.
Posted
by