Changes between Version 1 and Version 2 of JavascriptDebugging
- Timestamp:
- Jan 14, 2013, 9:04:14 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
JavascriptDebugging
v1 v2 1 1 == Introduction == 2 A large part of the game like components, GUI scripts or the AI are written in Javascript. If you have programmed C++ or used Javascript for Websites you probably know how important a good Debugger can be and how much it helps to find Bugs or learn how a Part of code works.3 The web based Tools like Firebug can't be used for 0 A.D. because the debugger has to be very closely connected to the Javascript runtime. However, there's a dedicated tool for 0 A.D. and the Pyrogenesis engine being developed at the moment that should hopefully be ready to use soon.2 A large part of the game like components, GUI scripts or the AI are written in Javascript. If you have programmed C++ or used Javascript for websites you probably know how important a good debugger can be and how much it helps to find bugs or learn how a part of code works. 3 The web based tools like Firebug can't be used for 0 A.D. because the debugger has to be very closely connected to the Javascript runtime. However, there's a dedicated tool for 0 A.D. and the Pyrogenesis engine being developed at the moment that should hopefully be ready to use soon. 4 4 5 5 == Technical background == 6 The DebuggingServer component makes debugging commands like (ToggleBreakpoint, Step, Continue etc...) available using a mongoose webserver.7 The format used for return values is JSON, which should be easy to parse from a Web-GUI.6 The DebuggingServer component makes debugging commands like (ToggleBreakpoint, Step, Continue etc...) available using a Mongoose webserver. 7 The format used for return values is JSON, which should be easy to parse from a web-GUI. 8 8 9 The Debugger uses the JSDBGAPI provided by Spidermonkey 1.8.5. Newer versions of Spidermonkey provide a simplified new API (along with memory leak fixes, performance improvements and more), but unfortunately Mozilla isn't interested in doing the work and publishing a independent build from Firefox at the moment.9 The debugger uses the JSDBGAPI provided by Spidermonkey 1.8.5. Newer versions of Spidermonkey provide a simplified new API (along with memory leak fixes, performance improvements and more), but unfortunately Mozilla isn't interested in doing the work and publishing a independent build from Firefox at the moment. 10 10 We had a [http://irclogs.wildfiregames.com/2013-01-02-QuakeNet-%230ad-dev.log discussion about that on IRC]. 11 11