A first Debugging Session with Firebug

Indroduction

During my last development I hit the following problem :

  • My Slider application does not start with the following error
  • Something goes wrong here but without a Stack Trace debugging is annoying

DebugFirebugP1

Start Debugging Firebug [ by pressing F12 – Firebug should be already installed ]

  • Preselect our source slider.js within Firebug

DebugFirebugP2

Set a breakpoint in function checkTrackIndex()

  • Right click and set the breakpoint at the line where the error condition is handled
  • After setting a breakpoint  press F8 to continue or you may need to reload your page

DebugFirebugP3

 

Restart the application and check out the status

DebugFirebugP4

  • The application stops at line 1247 in function checkTrackIndex()
  • Lets see what detail info is available by pressing the Stack tab

DebugFirebugP5

  • Now we should have a better understanding  what is going on
  • checkTrackInfoLoadStatus() calls loadroute() which calls checkTrackIndex()
  • In checkTrackIndex() lidx is undefined – Why ?
  • press on the loadRoute() function for further investigations

DebugFirebugP6

  •  At line 2737 we can see that checkTrackIndex() is called without a variable
  • This explains why the lidx variable in checkTrackIndex()  is undefined 

 

Leave a Reply

Your email address will not be published. Required fields are marked *