📄 index_en.html
字号:
<br>
</p>
<p>
<strong>NOTE</strong>:
<em>To vote on a news story on dzone.com, you must have a
Dzone account. You can register for your free Dzone account <a
href="http://www.dzone.com/users/register.html"
title="Register for a Dzone account">here</a>.</em>
<br>
</p>
<p>
The next step is to trigger a vote action and use the
<strong>AJAX Request Monitor</strong> to watch the request occur
in real-time to understand what JavaScript function is getting
called.
</p>
<p>
Once we've determined which function is being called, we'll set a
breakpoint in that JavaScript function and then vote again.
This will cause the breakpoint to be hit and give us a chance to
take a look at exactly what the script is doing (NOTE: Click
"Play" to see a demonstration):
<br>
</p>
<table class="screencast">
<tbody>
<tr>
<td class="screencast">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
id="Captivate1" height="600" width="800">
<param name="movie" value="screencasts/debugging.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="loop" value="0">
<embed src="screencasts/debugging.swf" loop="0"
quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" menu="false"
height="600" width="800">
</object>
</td>
</tr>
<tr>
<td>
<font class="figure">Figure 3. After starting the
debugging session, setting and hitting a breakpoint is easy</font>
<br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td valign="top">
<h1>
5.
<a name="Conclusion">Conclusion</a>
</h1>
<p>
We hope you now have a good idea of how AJAX debugging works in
MyEclipse. We've worked hard to make the debugging fast and easy
for not only your own work, for which you have the source code,
but for debugging other applications to learn how some of the
more advanced AJAX work is done. An additional benefit of
debugging is that you can shorten ramp-up time on a new project
if you can analyze the application from a user's perspective, as
opposed to simply digging through source code and trying to learn
it from the bottom up. If you have any suggestions for us to help
make it more informative, please
<a href="#Feedback" title="Send us Feedback">let us know</a>.
</p>
<p>
Below we would like to provide you with some more information
pertaining to the topic covered in this tutorial. We offer the
<a href="#FAQ" title="FAQ section">FAQ section</a> for quick
references to common questions and the
<a href="#Resource" title="Resource section">Resources
section</a> with links to other helpful resources online that you
may want to become familiar. We realize we can't cover
every question you may have in one tutorial, but between this
tutorial contents and our additional learning resources we hope
you are far on your way to feeling comfortable with the
technology.
<br>
</p>
</td>
</tr>
<tr>
<td valign="top">
<h1>
6.
<a name="FAQ">FAQ</a>
</h1>
<p>
This section will list some of the more common questions that can
come up while performing the tasks outlined in this tutorial.
</p>
<ol>
<li>
<strong>The JavaScript inspector, console, AJAX request
monitor and other views are empty.<br> </strong>
</li>
<ul>
<li>
The reason you are most likely seeing this is because you have
forgotten to click the Instant-On debugging button in the
toolbar that tells MyEclipse to load the current page into a
debugging session. After that, all those views will be
populated.
</li>
</ul>
<li>
<strong>I can't find the method being called. All
I see are "Anonymous" when I expand my JavaScript files.</strong>
</li>
<ul>
<li>
This is caused by anonymous function definitions in JavaScript.
The good news is that you can still set breakpoints in the code
and those breakpoints will still be hit when the debugger when
executed. You just need to determine which functions are
getting called by hand.
</li>
</ul>
<li>
<strong>Debugging is extremely slow, how can I speed it
up?</strong>
</li>
<ul>
<li>
Slow debugging can occur when the site you are debugging uses a
huge amount of JavaScript. Because every line of JavaScript
becomes a valid target for a breakpoint, evaluation of the
JavaScript at runtime gets more expensive and can seem slower.
To help speed up some debugging session you can tweak your
memory settings as outlined
<a
href="http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-10087.html"
title="MyEclipse Memory Settings">here</a>.
<br>
</li>
</ul>
</ol>
</td>
</tr>
<tr>
<td valign="top">
<h1>
7.
<a name="Resources">Resources</a>
</h1>
<p>
In this section we want to provide you with additional links to
resources that will make learning about AJAX and AJAX debugging
easier. While this is not an exhaustive list, we do make an
effort to point to the more popular links that should provide you
with diverse, high-quality information.
</p>
<p>
For developers that don't quite understand the "JavaScript" part
of "AJAX", we strongly suggest you have a look at our
<em>Introduction to JavaScript</em> section of links below. Those
articles will introduce you to basic JavaScript programming so
you'll understand how JavaScript works to enable you to more
easily understand where "debugging" stands in that process.
</p>
<p>
For the people that want to learn more about AJAX in general and
get some examples right away, skip down to the
<em>AJAX Resources, Sites and Tutorials</em> section for some
great links.
<br>
</p>
<h2>
Introduction to JavaScript
<br>
</h2>
<ul>
<li>
<a href="http://www.w3schools.com/js/default.asp"
title="Introduction to JavaScript programming">W3Schools:
Introduction to JavaScript programming</a>
</li>
<li>
<a href="http://www.webteacher.com/javascript/"
title="JavaScript programming for non-programmers">Webteacher:
JavaScript programming for non-programmers</a>
</li>
</ul>
<h2>
Background Information on AJAX
<br>
</h2>
<ul>
<li>
<a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29">Wikipedia:
What is AJAX?</a>
</li>
<li>
<a
href="http://www.adaptivepath.com/publications/essays/archives/000385.php">Adaptive
Path: The first introduction article to AJAX</a>
<br>
</li>
</ul>
<h2>
AJAX Resources, Sites and Tutorials
<br>
</h2>
<ul>
<li>
<a href="http://www.ajaxian.com/">Ajaxian: Excellent
resource for AJAX news and resources</a>
</li>
<li>
<a href="http://developer.mozilla.org/en/docs/AJAX">Mozilla:
AJAX Developer Center</a>
</li>
<li>
<a
href="http://java.sun.com/developer/technicalArticles/J2EE/AJAX/">Sun:
AJAX Programming in J2EE</a>
</li>
</ul>
<h2>
AJAX Frameworks
<br>
</h2>
<ul>
<li>
<a href="http://code.google.com/webtoolkit/">Google Web
Toolkit</a>
</li>
<li>
<a href="http://prototype.conio.net/">Prototype</a>
</li>
<li>
<a href="http://dojotoolkit.org/">Dojo Toolkit</a>
</li>
<li>
<a href="http://getahead.ltd.uk/dwr">DWR</a>
<br>
</li>
</ul>
</td>
</tr>
<tr>
<td valign="top">
<h1>
8.
<a name="Feedback">Feedback</a>
</h1>
<p>
We would like to hear from you! If you liked this tutorial, has
some suggestions or even some corrections for us please let us
know. We track all user feedback about our learning material in
our
<a
href="http://www.myeclipseide.com/PNphpBB2+file-viewforum-f-6.html"
title="Documentation Forum">Documentation Forum</a>.
Please be sure to let us know which piece of MyEclipse material
you are commenting on so we can quickly pinpoint any issues that
arise.
</p>
</td>
</tr>
</tbody>
</table>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -