Graphical Debugger

RSS for tag

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

Posts under Graphical Debugger tag

101 Posts

Post

Replies

Boosts

Views

Activity

Xcode 11 upgrade resulting in random crashes
Recently, I have upgraded my Xcode version from 9.2 to 11.3.1. My project, which was written in Swift 4, worked completely fine in 9.2. However, when trying to run it in 11.3.1, I have been experiencing random "EXC_BAD_ACCESS" crashes in areas of code that previously worked just fine. Now, the areas of code that are being affected are essentially identical to previous sections of the code, and when stepping through the code, every condition appears to be working just fine (nothing is nil or anything like that). I enabled zombie objects to check for deallocation, but I found nothing. Is there any particular issue with regards to upgrading to Xcode 11 I should be aware of, and any ideas of what might be causing this?
1
0
1.2k
Jun ’22
Xcode 11 debugger crashes on breakpoint, can't find Foundation.h
My macOS app compiles and runs fine, but since switching to Xcode 11, I can no longer debug from breakpoints. The debugger always crashes with a bunch of messages like this:warning: Swift error in scratch context: /foobar/Foo-Bridging-Header.h:14:9: note: in file included from /foobar/Foo-Bridging-Header.h:14: #import "TPPreciseTimer.h" ^ error: /foobar/Timer/TPPreciseTimer.h:9:9: error: 'Foundation/Foundation.h' file not found #import <Foundation/Foundation.h> ^ /foobar/Timer/TPPreciseTimer.h:9:9: note: did not find header 'Foundation.h' in framework 'Foundation' (loaded from '/System/Library/Frameworks') #import <Foundation/Foundation.h> ^ error: failed to import bridging header '/foobar/Foo-Bridging-Header.h' . Shared Swift state for Foo has developed fatal errors and is being discarded. REPL definitions and persistent names/types will be lost. Message from debugger: The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.Anyone know a workaround for something like this?My coworkers still on Xcode 10.3 are not having this issue with the same codebase.
5
0
8.4k
Jun ’22
Strange iOS Crash Only on iOS 13.X, unable to find the cause of crash
Hello,The app is in production/testfilght and I have seen this crash in Xcode Organizer. The highest percentage of such crashes.It is happening on some of the devices that run iOS 13.0 ~ 13.3.So I suppose it is happening while lunching the app.One of the crash reports is on: https://gist.github.com/gin7758258/0bdd45007a82003b1e96669ad33b5265Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001944b8634 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001944b7aa0 mach_msg + 72 (mach_msg.c:103) 2 CoreFoundation 0x0000000194660288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575) 3 CoreFoundation 0x000000019465b3a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931) 4 CoreFoundation 0x000000019465aadc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192) 5 GraphicsServices 0x000000019e5fb328 GSEventRunModal + 104 (GSEvent.c:2246) 6 UIKitCore 0x000000019876863c UIApplicationMain + 1936 (UIApplication.m:4773) 7 MYAPP 0x00000001047e8320 main + 152 (main.m:16) 8 libdyld.dylib 0x00000001944e4360 start + 4
7
1
12k
Jun ’22
Retrieving JetsamEvent files from device
I'm working with what appears to be a low-memory crash on an iPhone 4s that isn't mine. I can see JetsamEvent-<date> files being created, but I don't have a good way to get them back to my computer: they do not show up in the Device Logs sheet of Xcode's Devices window, and there's no way to manipulate them on the phone (under Settings > Diagnostics & Usage > Diagnostics & Usage Data) other than to manually select and copy all the text, and then mail or iMessage it to mysefl. There has to be a better way, right?Thanks.—Chris
7
0
17k
May ’22
Xcode 11 debugger error: Couldn't lookup symbols
I'm integrating a 3rd party library in my project. After updating to the latest version and switching from regular frameworks to XCframework I've started seeing this issue:Whenever I'm trying to inspect an object from the 3rd party library via LLDB console, e.g.po <object.property>i'm getting this error:error: Couldn't lookup symbols: dispatch thunk of <...>At the same time I can inspect the object in the Variables ViewAny idea if this is an integration or framework distribution issue ?
4
1
9.1k
Mar ’22
Touch Bar support for Debugging - Xcode 11.5
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.
1
0
2.4k
Mar ’22
Whats wrong with my watch during debugging?
When I set breakpoints I keep getting Invalid expression for variables that are clearly set and there "in context". Furthermore lets say I have an object X with a property y I'm able to check object X with all of its properties but If i try to watch for X.y I get "Invalid expression" this doesnt make much sense... I even try to add watch directly from X.y in the watch section but then I got this error Details Failed to set watch point Domain: IDEDebugSessionErrorDomain Code: 2 Failure Reason: error: Watchpoint creation failed (addr=0x282efac68, size=8, variable expression='self.controller'). error: sending gdb watchpoint packet failed User Info: {   DVTRadarComponentKey = 855031; } -- System Information macOS Version 12.1 (Build 21C52) Xcode 13.2.1 (19586) (Build 13C100) Timestamp: 2022-03-02T15:45:33Z I've looked into my build options for the project and optimizations are set to None on Debug... Am I missing something?
0
0
1.4k
Mar ’22
po $arg1 no longer working in Xode 6.4
I had set a breakpoint on objc_exception_throw, and added the debugger command po $arg1 (as mentioned in the latest WWDC, or http://natashatherobot.com/xcode-debugging-trick/For a while it worked great, but I recently updated Xcode and now I geterror: use of undeclared identifier '$arg1'Is there a new way to get the actual exception when you hit it?
9
0
5.9k
Feb ’22
Can you design a way to quickly backtrack what called a specific storyboard in Xcode?
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.
2
0
888
Jan ’22
Xcode 13 and Linux Makefile
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.
1
0
3.9k
Jan ’22
iOS 15 app ui keep breaking after few hour kept in background
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
1
0
2k
Jan ’22
Is possible to extract Assets.Car and Unix Executable file .ipa file
how to check the content present in the assets.car and unix executable file .ipa.
Replies
4
Boosts
0
Views
11k
Activity
Sep ’22
Xcode 11 upgrade resulting in random crashes
Recently, I have upgraded my Xcode version from 9.2 to 11.3.1. My project, which was written in Swift 4, worked completely fine in 9.2. However, when trying to run it in 11.3.1, I have been experiencing random "EXC_BAD_ACCESS" crashes in areas of code that previously worked just fine. Now, the areas of code that are being affected are essentially identical to previous sections of the code, and when stepping through the code, every condition appears to be working just fine (nothing is nil or anything like that). I enabled zombie objects to check for deallocation, but I found nothing. Is there any particular issue with regards to upgrading to Xcode 11 I should be aware of, and any ideas of what might be causing this?
Replies
1
Boosts
0
Views
1.2k
Activity
Jun ’22
Xcode 11 debugger crashes on breakpoint, can't find Foundation.h
My macOS app compiles and runs fine, but since switching to Xcode 11, I can no longer debug from breakpoints. The debugger always crashes with a bunch of messages like this:warning: Swift error in scratch context: /foobar/Foo-Bridging-Header.h:14:9: note: in file included from /foobar/Foo-Bridging-Header.h:14: #import "TPPreciseTimer.h" ^ error: /foobar/Timer/TPPreciseTimer.h:9:9: error: 'Foundation/Foundation.h' file not found #import <Foundation/Foundation.h> ^ /foobar/Timer/TPPreciseTimer.h:9:9: note: did not find header 'Foundation.h' in framework 'Foundation' (loaded from '/System/Library/Frameworks') #import <Foundation/Foundation.h> ^ error: failed to import bridging header '/foobar/Foo-Bridging-Header.h' . Shared Swift state for Foo has developed fatal errors and is being discarded. REPL definitions and persistent names/types will be lost. Message from debugger: The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.Anyone know a workaround for something like this?My coworkers still on Xcode 10.3 are not having this issue with the same codebase.
Replies
5
Boosts
0
Views
8.4k
Activity
Jun ’22
Strange iOS Crash Only on iOS 13.X, unable to find the cause of crash
Hello,The app is in production/testfilght and I have seen this crash in Xcode Organizer. The highest percentage of such crashes.It is happening on some of the devices that run iOS 13.0 ~ 13.3.So I suppose it is happening while lunching the app.One of the crash reports is on: https://gist.github.com/gin7758258/0bdd45007a82003b1e96669ad33b5265Thread 0 name: Thread 0 Crashed: 0 libsystem_kernel.dylib 0x00000001944b8634 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001944b7aa0 mach_msg + 72 (mach_msg.c:103) 2 CoreFoundation 0x0000000194660288 __CFRunLoopServiceMachPort + 216 (CFRunLoop.c:2575) 3 CoreFoundation 0x000000019465b3a8 __CFRunLoopRun + 1444 (CFRunLoop.c:2931) 4 CoreFoundation 0x000000019465aadc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192) 5 GraphicsServices 0x000000019e5fb328 GSEventRunModal + 104 (GSEvent.c:2246) 6 UIKitCore 0x000000019876863c UIApplicationMain + 1936 (UIApplication.m:4773) 7 MYAPP 0x00000001047e8320 main + 152 (main.m:16) 8 libdyld.dylib 0x00000001944e4360 start + 4
Replies
7
Boosts
1
Views
12k
Activity
Jun ’22
Retrieving JetsamEvent files from device
I'm working with what appears to be a low-memory crash on an iPhone 4s that isn't mine. I can see JetsamEvent-<date> files being created, but I don't have a good way to get them back to my computer: they do not show up in the Device Logs sheet of Xcode's Devices window, and there's no way to manipulate them on the phone (under Settings > Diagnostics & Usage > Diagnostics & Usage Data) other than to manually select and copy all the text, and then mail or iMessage it to mysefl. There has to be a better way, right?Thanks.—Chris
Replies
7
Boosts
0
Views
17k
Activity
May ’22
XCode 13.3 stuck when input Chinese in lldb console
XCode 13.3 stuck when input Chinese in lldb console
Replies
14
Boosts
0
Views
3.4k
Activity
May ’22
Unable to determine byte size
I'm having a very annoying issue where I'm unable to debug. Everytime I use po or print on an object I get:`Unable to determine byte size`Any idea how to fix this?
Replies
5
Boosts
0
Views
3.6k
Activity
May ’22
Xcode 11 debugger error: Couldn't lookup symbols
I'm integrating a 3rd party library in my project. After updating to the latest version and switching from regular frameworks to XCframework I've started seeing this issue:Whenever I'm trying to inspect an object from the 3rd party library via LLDB console, e.g.po <object.property>i'm getting this error:error: Couldn't lookup symbols: dispatch thunk of <...>At the same time I can inspect the object in the Variables ViewAny idea if this is an integration or framework distribution issue ?
Replies
4
Boosts
1
Views
9.1k
Activity
Mar ’22
Touch Bar support for Debugging - Xcode 11.5
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.
Replies
1
Boosts
0
Views
2.4k
Activity
Mar ’22
M1 Pro Xcode 13.2.1 breakpoint debugging
Invalid breakpoint debugging. Tried several versions of Xcode.The breakpoint before app startup can take effect, and the breakpoint after that will not take effect. What caused the problem? My colleagues also encountered the same problem and the same configuration
Replies
0
Boosts
0
Views
812
Activity
Mar ’22
error: memory read failed for 0x0, no stack
Xcode debug my app, I find some thread no stack, only 0x00000000 (but not crash).Stack info:error: memory read failed for 0x0I think stack overflow, so I try use tool "Address Sanitizer", but not found too.Why is this happening, xcode no stack?Screenshot url:https://i.stack.imgur.com/N0wGW.png
Replies
9
Boosts
0
Views
9.7k
Activity
Mar ’22
Whats wrong with my watch during debugging?
When I set breakpoints I keep getting Invalid expression for variables that are clearly set and there "in context". Furthermore lets say I have an object X with a property y I'm able to check object X with all of its properties but If i try to watch for X.y I get "Invalid expression" this doesnt make much sense... I even try to add watch directly from X.y in the watch section but then I got this error Details Failed to set watch point Domain: IDEDebugSessionErrorDomain Code: 2 Failure Reason: error: Watchpoint creation failed (addr=0x282efac68, size=8, variable expression='self.controller'). error: sending gdb watchpoint packet failed User Info: {   DVTRadarComponentKey = 855031; } -- System Information macOS Version 12.1 (Build 21C52) Xcode 13.2.1 (19586) (Build 13C100) Timestamp: 2022-03-02T15:45:33Z I've looked into my build options for the project and optimizations are set to None on Debug... Am I missing something?
Replies
0
Boosts
0
Views
1.4k
Activity
Mar ’22
XCode 13.2.1 problem on view hierarchy option on MacBook PRO with M1
On XCode 13.2.1 on MacBook Pro (16", 2021) with Apple M1 Max the View Hierarchy not work I found the error on the attached screen
Replies
0
Boosts
0
Views
1.9k
Activity
Feb ’22
po $arg1 no longer working in Xode 6.4
I had set a breakpoint on objc_exception_throw, and added the debugger command po $arg1 (as mentioned in the latest WWDC, or http://natashatherobot.com/xcode-debugging-trick/For a while it worked great, but I recently updated Xcode and now I geterror: use of undeclared identifier '$arg1'Is there a new way to get the actual exception when you hit it?
Replies
9
Boosts
0
Views
5.9k
Activity
Feb ’22
Attach To Process Problem
in Xcode 13.2.1 debug menu attach to process does not show any process list.
Replies
1
Boosts
0
Views
762
Activity
Jan ’22
Capture GPU Frame Fail
Capture GPU Frame failed when i use Capture GPU Frame in iOS 10.2 iPhone6 Plus using Xcode 8.2.1.Logs:Unexpected Replayer TerminationReplayer terminated unexpectedly with error code 5.Please export the frame capture file then file a radartimed out (5)Capture GPU Frame works well in another project.
Replies
15
Boosts
0
Views
9.5k
Activity
Jan ’22
Can you design a way to quickly backtrack what called a specific storyboard in Xcode?
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.
Replies
2
Boosts
0
Views
888
Activity
Jan ’22
Unable to use view debugger for share extension
When try to use view debugger on share extension, it only shows a blank placeholder view and not my share extension UI, is his supported?
Replies
0
Boosts
0
Views
709
Activity
Jan ’22
Xcode 13 and Linux Makefile
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.
Replies
1
Boosts
0
Views
3.9k
Activity
Jan ’22
iOS 15 app ui keep breaking after few hour kept in background
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
Replies
1
Boosts
0
Views
2k
Activity
Jan ’22