Warning: Constant ABSPATH already defined in /var/www/html/site/wp-config.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:34) in /var/www/html/site/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 172

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:34) in /var/www/html/site/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:34) in /var/www/html/site/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/site/wp-config.php:34) in /var/www/html/site/wp-content/plugins/comet-cache/src/includes/traits/Shared/HttpUtils.php on line 175

Warning: Constant WP_DEBUG already defined in /var/www/html/site/wp-config.php on line 39

Warning: Undefined variable $phpexec_output in /var/www/html/site/wp-content/plugins/phpexec.php on line 68

Warning: Trying to access array offset on false in /var/www/html/site/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 61

Warning: Trying to access array offset on false in /var/www/html/site/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 61

Warning: Trying to access array offset on false in /var/www/html/site/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 61

Warning: Trying to access array offset on false in /var/www/html/site/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 61

Warning: Trying to access array offset on false in /var/www/html/site/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 61

Warning: Trying to access array offset on false in /var/www/html/site/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 61

Warning: Trying to access array offset on false in /var/www/html/site/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 61

Warning: Trying to access array offset on false in /var/www/html/site/wp-content/plugins/syntax-highlighter-mt/stxhighlightmt.php on line 61
Debug Exception in Xcode - Appmire blog

Debug Exception in Xcode

Sometimes it happens that Xcode throws you an exception, and you don’t know why. How do you print the relevant Exception information?

To get more information, you can configure the debugger to break when any exception is thrown. Go to the Breakpoint Navigator and click the little ‘+’-button at the bottom. Then click “Add Exception Breakpoint”.

Add Exception BreakpointBut, in many cases, even then you don’t get the information you wanted when the Exception occurs. Add these commands to the breakpoint configuration to show the name and reason of the breakpoint. This should get you on the way to eliminate the error.

Breakpoint on all exceptions

po [*(id *)($esp+4) name] and

po [*(id *)($esp+4) reason]

 

This works when you are using LLDB by printing the name and reason of the exception in the command window. You can also execute those commands in the command window, but you have to make sure to select stackframe 0 first.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.