I am studying this page: http://www.fxstreet.com/rates-charts/currency-rates/ which is continually updated by JavaScript with new data from the server. So clearly there is some JavaScript function continually executing in the page. So I opened Firebug and I don't see any "profiler" type output that would continually add new info about executing scripts. The "script" tab only shows 46 not very clear records, without timestamps and without any indication that there is continual new JavaScript activity to profile.
What am I doing wrong? How do I go about groking the JavaScript activity on a page?
In the Console
tab of Firebug there is a Profile
button next to Clear
and Persist
, which does what you're trying to do. It's not real-time but you can let it run for a certain time period and analyse the results afterwards which should show you what you're looking for.
You can do one of three things
If it is server request/response information you are looking for you want to look at the "Net" tab of firebug
In firebug, or chrome dev tools, select the js file cometd-1.1.2-teletrader.js. Once there, you can set a breakpoint at line 167 or :
function _longpollComplete
you can also put a breakpoint at line 171 :
function _complete
once you break into the code you can see the objects being returned which contain the data which update the grid. you can step into _longpoolComplete and see the data structure :
0: Object channel: "/teletrader/symbols/3212198" data: Object change: "0.0124" changePercent: "0.1848" dateTime: "11.11.2011 02:19:20" last: "6.6964" symbolId: 3212198
1: Object channel: "/teletrader/symbols/3212160" data: Object change: "-0.2725" changePercent: "-0.2202" dateTime: "11.11.2011 02:19:21" last: "123.4650" symbolId: 3212160
etc.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.