Select to view content in your preferred language

Multiple define error when debugging Javascript in Firebug

3576
1
11-17-2014 10:02 AM
JonathanMeyer
New Contributor

I keep getting multiple define errors when debugging any ESRI javascript API solution with Firebug.  The multipleDefine errors only happen when I have break points set in the JS code.  It also seems to only happen after the page is reloaded.  WIth the breakpoints not set the page will load fine without any errors.  I thought I had something wrong with my code until I tried debugging other sample code and sites online and get the same result.  Anyone else see this or know what is causing it? 

0 Kudos
1 Reply
DavidElies
New Contributor III

I don't know what's causing your error in particular, but I know this happens if your <script> tag that loads the Javascript API is reached and processed more than once.  This is because the dojo define/require functions are loaded after they have already been loaded.  I'm guessing that if you're not loading the code in more than once place (or running the code more than once from the same place), that firebug might be "caching" the call for the esri library, so it actually loads more than once.  I know that I don't see this error in the esri samples when using the Chrome developer tools.

0 Kudos