J
Java script Dude
Update...
I have lately had time to play around with my cross browser debugging
and have come up with what I am sure is the ideal solution. It is very
complex but allows for fluid debugging between both browsers without
the use of external tools / debuggers.
..: General Concept of my Debugging Solution :.
The key to the design is to serialize the error on initial error
handler in the stack and concatenate to this serialized information as
it is passed up the throw stack (subsequent try catch blocks). When
the error finally gets to the global error handler, the code retrieves
the error stored in a global variable and then appends general
information. The global error handler then searches for client logic
(singleton object) and requests that the client handle the error (this
allows for client specific handling of errors). If there is no client
or it is incorretly handled, the error is thrown up to the root and is
handled by the browser (JS Console or whatever).
The Framework includes:
- Console window displaying caller name, js source*, line number*.
Similar to log4j without any configuration or log / warn / fatal ...
capability (may come later)
- Error handling framework that allows collection of information up
the entire throw stack for a complete snapshot of full environment of
any error.
- Preservation of original (root cause) error up to the root error
handler (window.onerror)
- useful dump and pad methods for slick formatting of debug dumps.
- Stack trace parsers that work between both IE and Moz (moz has
source file and line number)
- Debug Dump object that allows for aggregation and organization of
debug data for retrieval and serialization (eg. xml of error info back
to server).
The entire top level framework is going to be made available in coming
months as GPL'd code. I have also integrated tweaked up Base.js and
jsonrpc.js into my libraries for complete RPC framework and OOP
designs.
It has been so much fun getting back into the JS.
I'll keep everyone posted
- JsD
I have lately had time to play around with my cross browser debugging
and have come up with what I am sure is the ideal solution. It is very
complex but allows for fluid debugging between both browsers without
the use of external tools / debuggers.
..: General Concept of my Debugging Solution :.
The key to the design is to serialize the error on initial error
handler in the stack and concatenate to this serialized information as
it is passed up the throw stack (subsequent try catch blocks). When
the error finally gets to the global error handler, the code retrieves
the error stored in a global variable and then appends general
information. The global error handler then searches for client logic
(singleton object) and requests that the client handle the error (this
allows for client specific handling of errors). If there is no client
or it is incorretly handled, the error is thrown up to the root and is
handled by the browser (JS Console or whatever).
The Framework includes:
- Console window displaying caller name, js source*, line number*.
Similar to log4j without any configuration or log / warn / fatal ...
capability (may come later)
- Error handling framework that allows collection of information up
the entire throw stack for a complete snapshot of full environment of
any error.
- Preservation of original (root cause) error up to the root error
handler (window.onerror)
- useful dump and pad methods for slick formatting of debug dumps.
- Stack trace parsers that work between both IE and Moz (moz has
source file and line number)
- Debug Dump object that allows for aggregation and organization of
debug data for retrieval and serialization (eg. xml of error info back
to server).
The entire top level framework is going to be made available in coming
months as GPL'd code. I have also integrated tweaked up Base.js and
jsonrpc.js into my libraries for complete RPC framework and OOP
designs.
It has been so much fun getting back into the JS.
I'll keep everyone posted
- JsD