Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It's unbelievable but my company is still building web app on IE 6. Although the online dashboard for IE 6 is limited in functionality, I've found extremely difficult to debug anything on it. It's probably the most challenging task in my career, and I'm considering to leave the job because it takes way too much time to do anything.

On Chrome, I could simply add a breakpoint in a JavaScript source, but this is not possible on IE 6. Nothing on IE 6 seems make sense, for example, the CSS simply don't work. There is no web console.

How did the programmers 10-15 years ago managed to debug anything? Currently, I'll have to show an alert box to debug a loop, so I'd have to close off the alert box for each iteration of the loop. 100 alert boxes for a loop with 100 iterations...

share|improve this question

closed as too broad by Snowman, Robert Harvey, gnat, Bart van Ingen Schenau, MichaelT Nov 4 '15 at 15:30

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Step 1 - stop trying to support IE6 – Dannnno Nov 4 '15 at 4:08
1  
@Dannnno Not possible because IE 6 is still being used by some of the largest corporations. – Student T Nov 4 '15 at 4:09
1  
I'm voting to close this question as off-topic because it is asking how to use a software tool. – Snowman Nov 4 '15 at 4:10
4  
They're exposing themselves to huge risks. Has anyone explained that to them? – Robert Harvey Nov 4 '15 at 4:20
3  
@RobertHarvey: I guess the OP is not in a position to make any suggestions against supporting IE6, no matter how well-founded the reasons are. But let's inform some black hats that Quantas is still using IE6, some people have to learn it the hard way. – Doc Brown Nov 4 '15 at 7:27
up vote 6 down vote accepted

Actually, lets go a bit further:

There are two kinds of browsers - ones that provide a console interface with a log method, and ones that don't.

Right before you do any other javascript, have the following code (assuming you have jQuery - adapt if you use something else):

if (!window.console) {
   var consoleElement = $("<div>");
   consoleElement.addClass("console"); // use CSS to position and style this element for testing

   $("body").append(consoleElement);

   console = {
       log: function(message) {
           var messageElement = $("<span>");
           messageElement.addClass("console")
               .text(message);

           $("#console").append(messageElement);
       }
   };
}

A more complete approach can be found at http://stackoverflow.com/a/13817235/184124

share|improve this answer

Have you tried downloading the Internet Explorer Developer Toolbar? It will help you debug and troubleshoot your webpages on IE6 or other versions: http://www.microsoft.com/en-us/download/details.aspx?id=18359

share|improve this answer

Use Internet Explorer 11 and have it emulate Internet Explorer 5.

F12 -> Emulation -> Document Mode

Internet Explorer will then behave like Internet Explorer 5/6, but will offer you all the modern debugging tools.

Regarding your question

How did the programmers 10-15 years ago managed to debug anything?

Javascript applications used to be far simpler back then, so javascript debugging capabilities didn't need to be complex either. There wasn't that much you could do with Javascript anyway. Lots of features we take for granted now didn't exist back then. More complex applications were usually implemented purely server-sided or with plugins like Adobe Macromedia Flash.

Because CSS was so poor and inconsistent back then, lots of people abused tables nested in tables nested in tables to create layouts. Although frowned upon today, this was the most reliable and convenient way to get elements to where you wanted them to be.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.