SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Evangelist Jhorra's Avatar
    Join Date
    Sep 2004
    Location
    Phoenix, Az
    Posts
    551
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I debug in IE?

    I have written an ajax call using Scriptaculous and jquery. It works fine in both Firefox and Opera. When I try it in IE, I get a generic object expected error. How do I even begin to debug this in IE?

  2. #2
    SitePoint Member
    Join Date
    Jul 2007
    Location
    Silion Valley
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Since you're getting the error on an AJAX call, it's probably a server error that's causing your server to return a 500 error page. The browser doesn't expect that and breaks. To debug that, I use Fiddler (google it). It's a microsoft tool that shows you the communication between the browser and the server. With this tool, you can easily see if the server is returning the response you're expecting. And if not, you can see the error message page.
    I've made every mistake and suffered every pain.
    So you don't have to.
    Stuck with JS or AJAX issue? Ask me here.

  3. #3
    SitePoint Evangelist Jhorra's Avatar
    Join Date
    Sep 2004
    Location
    Phoenix, Az
    Posts
    551
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm pretty sure it's not getting that far. I don't think it's even making the call.

  4. #4
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Find the line, where the exception is raised. "Object expected" happens when you're calling a method on a variable, which is undefined.

    There are some fairly usable debugging tools for IE - See the Javascript Links & Resources thread.

  5. #5
    SitePoint Member
    Join Date
    Jul 2007
    Location
    Silion Valley
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, in these cases, I use Visual Studio to debug. When a javascript error happens, IE throws an error and gives the option to debug. Hitting the debug button opens the javascript page in Visual Studio and then I can debug it there. It's a very powerful tool. To enable it, though, you have to make sure that debugging is enabled in your IE (in the advanced options), and you need to have either Visual Studio, or download the free debugger from microsoft.
    I've made every mistake and suffered every pain.
    So you don't have to.
    Stuck with JS or AJAX issue? Ask me here.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •