#6863 closed defect (fixed)
Debugging is broken
Reported by: | guest | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | General | Version: | 1.1.1 |
Keywords: | debug debugger try exception | Cc: | Adam Peller |
Blocked By: | Blocking: |
Description
Debugging is broken and complaints are long overdue. Since Firefox exceptions do keep track of the call stack, but Firefox or Firebug is unable to produce or show the correct lines of code (e.g., if document.write is used) and is therefore nearly useless for debugging, and since IE exceptions do not record the call stack if the exception is ever caught rather than being allowed to percolate to the top at which case source code is indeed accurately displayed, Dojo needs to be very careful about its try statements. For debugging purposes there should be an option to turn them off, perhaps coordinated with djConfig.isDebug. This should disable use of try in dojo.Deferred._fire, dojo._watchInFlight(), and dojo.loaded() so that errors in load code for xhr requests can be properly debugged.
Change History (6)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
So it sounds like for this to work, we need to break out code that does try/catch into two functions (one with no try/catch, one that does a try catch around that one), then in the code use something like dojo.config.isDebug ? directCall() : tryCatchCall();
I can see using isDebug for this purpose to be a reasonable flag to use.
comment:3 Changed 14 years ago by
Cc: | Adam Peller added |
---|
comment:4 Changed 14 years ago by
Owner: | changed from anonymous to James Burke |
---|
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 Changed 14 years ago by
r14255 also applies to this ticket (trac svn updates not working again?)
Yeah, I find all the try/catches very annoying too, in particular this one from loader.js which masks errors in all the widgets (at least the declarative ones):
I assume this ticket is from Alex?