Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7920215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:07:56+00:00 2026-06-03T16:07:56+00:00

Is it possible to get a line number for the source code (or anything

  • 0

Is it possible to get a line number for the source code (or anything that helps debug where the problem is) from the debugger, that shows where the problem is originating?

I am getting an error:

-[NSCFArray objectAtIndex:]: index (-1 (or possibly larger)) beyond bounds (9)

which obviously means that I am going out of bounds at some point, however if it possible I would like to get some more information to help me solve the problem.

I am placing a breakpoint and trying to go through the program line by line but it is a tedious process. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:07:58+00:00Added an answer on June 3, 2026 at 4:07 pm

    When the debugger stops, go to the “Debug Navigator” and make sure the slider on the bottom is all the way to the right.

    Scan your eye down from the point at which the exception is thrown and you should eventually come to your own code. Click on the appropriate method/function name and the code will be opened in the editor.

    enter image description here

    enter image description here

    If you don’t see any of your own methods in the stack trace, the exception may have been passed through a performSelector-style call in which case the stack trace is gone. If this is the case, you may get better information by adding an “On Throw” exception break point. First switch to the “Breakpoint navigator”:

    enter image description here

    Then click on the plus and choose “Add Exception breakpoint…”

    enter image description here

    Create an “On Throw” break point:

    enter image description here

    This will stop the debugger at the exact point the exception is thrown, and you get a better stack trace. It’s a good idea to have an exception break point like this enabled all the time, although you will occasionally get internal exceptions from Apple code (e.g. when using QLPreviewController, MPMoviePlayerController).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to get text (line or sentence) from a given line number
Is it possible to get the current source line number in Perl? The equivalent
I know that you can get the line number and column number from a
Is it possible to get the first line of text from a UITextView. I
It is possible to get current line number by __LINE__ in Ruby or Perl.
Is it possible to get the line number, where the script threw an error?
Is it possible that I can view the line number and file name (for
I was wondering if it is possible to get the number of the line
Is it possible to get Log4perl to correctly display the line number and package/class
Possible Duplicate: Get all files from VSS for a given date? I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.