ie js console doesn't show correct file

Discussion in 'Javascript' started by webEater, Sep 30, 2006.

  1. webEater

    webEater Guest

    everytime i test my websites in ie (which should be done seperately
    from ff) the console shows me the error and the line number.
    problem: it shows me the line number of the file of the error's origin,
    but it shows me the main html file as file name.
    i am developing a bigger project with many js files and often i have to
    go through all js files cause i don't know really which file is meant.

    is it possible that ie shows me the correct file?
    webEater, Sep 30, 2006
    #1
    1. Advertising

  2. webEater

    Saurabh Guest

    webEater wrote:
    > everytime i test my websites in ie (which should be done seperately
    > from ff) the console shows me the error and the line number.
    > problem: it shows me the line number of the file of the error's origin,
    > but it shows me the main html file as file name.
    > i am developing a bigger project with many js files and often i have to
    > go through all js files cause i don't know really which file is meant.
    >
    > is it possible that ie shows me the correct file?


    try to display stacktrace.
    in stack trace from where the execution began and where the error
    occured which led to termination of execution is displayed.
    like if your backend is .net use try{}catch(Exception e){ return
    e.Stacktrace; }
    Saurabh, Sep 30, 2006
    #2
    1. Advertising

  3. webEater

    webEater Guest

    > > everytime i test my websites in ie (which should be done seperately
    > > from ff) the console shows me the error and the line number.
    > > problem: it shows me the line number of the file of the error's origin,
    > > but it shows me the main html file as file name.
    > > i am developing a bigger project with many js files and often i have to
    > > go through all js files cause i don't know really which file is meant.
    > >
    > > is it possible that ie shows me the correct file?

    >
    > try to display stacktrace.
    > in stack trace from where the execution began and where the error
    > occured which led to termination of execution is displayed.
    > like if your backend is .net use try{}catch(Exception e){ return
    > e.Stacktrace; }


    First of all I am progging javascript, in JS there is no explicit type
    declaration, second thing: e.Stacktrace does not exist in IE.
    Normally I include several JS files, like this:

    ....
    <script type="text/javascript" src="../js/prototype.js"></script>
    <script type="text/javascript"
    src="../js/prototype_extended.js"></script>
    <script type="text/javascript">
    jsPath = '../js/uniajax/';
    </script>
    <script type="text/javascript" src="../js/uniajax/uniajax.js"></script>
    <script type="text/javascript" src="../js/run.js"></script>
    ....
    </head>
    <body>
    ....
    <script type="text/javascript" src="js/tagging.js"></script>
    ....
    <script type="text/javascript" src="../js/onload.js"></script>

    ^ This is a real example of a current project. Now image that IE throws
    an error and I don't know from which of those dozens of files it comes
    from, thats funny;)( There is no way to put a try { ... } catch around
    all the files.

    Does somebody have a solution for me?
    webEater, Oct 1, 2006
    #3
  4. webEater

    Ian Collins Guest

    webEater wrote:
    >>>everytime i test my websites in ie (which should be done seperately
    >>>from ff) the console shows me the error and the line number.
    >>>problem: it shows me the line number of the file of the error's origin,
    >>>but it shows me the main html file as file name.
    >>>i am developing a bigger project with many js files and often i have to
    >>>go through all js files cause i don't know really which file is meant.
    >>>
    >>>is it possible that ie shows me the correct file?

    >>
    >>try to display stacktrace.
    >>in stack trace from where the execution began and where the error
    >>occured which led to termination of execution is displayed.
    >>like if your backend is .net use try{}catch(Exception e){ return
    >>e.Stacktrace; }

    >
    >
    > First of all I am progging javascript, in JS there is no explicit type
    > declaration, second thing: e.Stacktrace does not exist in IE.
    > Normally I include several JS files, like this:
    >
    > ....
    > <script type="text/javascript" src="../js/prototype.js"></script>
    > <script type="text/javascript"
    > src="../js/prototype_extended.js"></script>
    > <script type="text/javascript">
    > jsPath = '../js/uniajax/';
    > </script>
    > <script type="text/javascript" src="../js/uniajax/uniajax.js"></script>
    > <script type="text/javascript" src="../js/run.js"></script>
    > ....
    > </head>
    > <body>
    > ....
    > <script type="text/javascript" src="js/tagging.js"></script>
    > ....
    > <script type="text/javascript" src="../js/onload.js"></script>
    >
    > ^ This is a real example of a current project. Now image that IE throws
    > an error and I don't know from which of those dozens of files it comes
    > from, thats funny;)( There is no way to put a try { ... } catch around
    > all the files.
    >
    > Does somebody have a solution for me?
    >

    Make small changes and test often. You'll probably find a good
    percentage of errors are common to IE and Firefox, so you can use the
    latter to track them down.

    --
    Ian Collins.
    Ian Collins, Oct 2, 2006
    #4
  5. webEater

    Dag Sunde Guest

    webEater wrote:
    >>> everytime i test my websites in ie (which should be done seperately
    >>> from ff) the console shows me the error and the line number.
    >>> problem: it shows me the line number of the file of the error's
    >>> origin, but it shows me the main html file as file name.
    >>> i am developing a bigger project with many js files and often i
    >>> have to go through all js files cause i don't know really which
    >>> file is meant.
    >>>
    >>> is it possible that ie shows me the correct file?

    >>
    >> try to display stacktrace.
    >> in stack trace from where the execution began and where the error
    >> occured which led to termination of execution is displayed.
    >> like if your backend is .net use try{}catch(Exception e){ return
    >> e.Stacktrace; }

    >
    > First of all I am progging javascript, in JS there is no explicit type
    > declaration, second thing: e.Stacktrace does not exist in IE.
    > Normally I include several JS files, like this:
    >
    > ...
    > <script type="text/javascript" src="../js/prototype.js"></script>
    > <script type="text/javascript"
    > src="../js/prototype_extended.js"></script>
    > <script type="text/javascript">
    > jsPath = '../js/uniajax/';
    > </script>
    > <script type="text/javascript"
    > src="../js/uniajax/uniajax.js"></script> <script
    > type="text/javascript" src="../js/run.js"></script> ...
    > </head>
    > <body>
    > ...
    > <script type="text/javascript" src="js/tagging.js"></script>
    > ...
    > <script type="text/javascript" src="../js/onload.js"></script>
    >
    > ^ This is a real example of a current project. Now image that IE
    > throws an error and I don't know from which of those dozens of files
    > it comes from, thats funny;)( There is no way to put a try { ... }
    > catch around all the files.
    >
    > Does somebody have a solution for me?


    When this error occurs in IE, you should get a question about if you
    want to debug... (If you have a script debugger installed, that is).

    Make sure that "Disable Script debugging" IS NOT checked, and
    "Display a notification about every script error" IS checked in <Tools>
    <Internet Options> on the <Advanced> tab.

    Also make sure that you have a script debugger installed. "Microsoft
    Script Debugger" is a sepatate install, Installing Visual Studio 6.0
    With Frontpage will also install one. If you have Visual Studio .NET 2005,
    you'll have one of the best debuggers I've seen.

    When all this is set up, click the debug button when the error occurs,
    and you'll be taken into the debugger with the offending code hilighted.
    You will now have full access to local and global variables, call stack,
    et.c. et.c...

    --
    Dag.
    Dag Sunde, Oct 2, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Finney
    Replies:
    2
    Views:
    972
    Egor Bolonev
    Jun 30, 2003
  2. Egor Bolonev
    Replies:
    0
    Views:
    461
    Egor Bolonev
    Jun 30, 2003
  3. Serge Terekhoff
    Replies:
    0
    Views:
    626
    Serge Terekhoff
    Jun 30, 2003
  4. nick
    Replies:
    3
    Views:
    368
    Grant Wagner
    Jun 15, 2004
  5. froil
    Replies:
    12
    Views:
    298
    Gunnar Hjalmarsson
    Mar 2, 2006
Loading...

Share This Page