ie js console doesn't show correct file

W

webEater

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?
 
S

Saurabh

webEater said:
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; }
 
W

webEater

everytime i test my websites in ie (which should be done seperately
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?
 
I

Ian Collins

webEater said:
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.
 
D

Dag Sunde

webEater said:
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...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top