1

I have used one function in my application which through error message.

This I have done to identify the error line number and file location.

That is fine it work good but I am confused for those line numbers because it has 2 value for each.

Please have look on one of same error message:

Error
    at Object.Core.initAlert (http://localhost/demo/core.js:205:22)
    at http://localhost/demo/app.js:26:10
    at _setImmediate (http://localhost/demo/async.js:182:20)
    at http://localhost/demo/async.js:234:13
    at http://localhost/demo/async.js:113:13
    at _arrayEach (http://localhost/demo/async.js:85:13)
    at _forEachOf (http://localhost/demo/async.js:112:9)
    at _each (http://localhost/demo/async.js:77:13)
    at Object.async.forEachOf.async.eachOf (http://localhost/demo/async.js:233:9)
    at Object.async.forEach.async.each (http://localhost/demo/async.js:210:22)

You can see at last of line there are two line numbers and I am confused here that which one is the line number for function statement. First one or second.

For ex. IN first line:

at Object.Core.initAlert (http://localhost/demo/core.js:205:22)

205 and 22 are there

Do anyone know about it....

Or is there any other way to track stack of execution in javascript.

2
  • 2
    The first one is the line number, the second is the column number Commented Jul 22, 2015 at 12:26
  • @depperm thats an answer ;) Commented Jul 22, 2015 at 12:28

3 Answers 3

4

The first number is the line number, the second number is the column number.

Sign up to request clarification or add additional context in comments.

Comments

0

The first number tells you the line number.

The second number represents the character starting position in that line where the error occurred.

Comments

0

at Object.Core.initAlert (http://localhost/demo/core.js:205:22)

205: is line number and 22: column number.

Link for more information to understand stack traces.

Web Inspector - Understanding Stack Traces

Chrome Developer Tools Understanding

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.