Developer tools displays the same script file multiple times

1,965 views
Skip to first unread message

jordan...@gmail.com

unread,
Jul 17, 2012, 2:46:12 PM7/17/12
to google-chrome-...@googlegroups.com
I am running the developer console inside of Salesforce.com, and every time I load a page, I get 7-10 copies of each JS file that is loaded in the 'Scripts' panel! 

When I set breakpoints they are also hit 7-10 times (even though the code only seems to be executing once) and the JS runs normally.

What's going on?
chrome_multiple_scripts.png

Vsevolod Vlasov

unread,
Jul 17, 2012, 3:39:21 PM7/17/12
to jordan...@gmail.com, google-chrome-...@googlegroups.com
This could happen when you have several frames with the same script on the page. Is it the case?
Which version of Google Chrome do you use?
Do you have developer tools open before you open the page or do you open it after the page was loaded? Do you observe the problem in both cases?
Is the page on which you are experiencing a problem publicly accessible or can you provide me with some test credentials ?

Thank you,
Vsevolod
--
Thank you,
Vsevolod Vlasov (vse...@google.com)

jordan...@gmail.com

unread,
Jul 17, 2012, 4:12:19 PM7/17/12
to google-chrome-...@googlegroups.com, jordan...@gmail.com
Hi Vsevolod,

Chrome Version: 20.0.1132.57

We have multiple iframes on the page, and some of them share the same script files, others do not.

The browser does seems load multiple copies of scripts that aren't included in the the iframes, (specifically script files from static resources that are only referenced once on the parent page, and not in the iframes.)

All Visualforce pages (SFDC's Mark-up template engine) share some JS files, so I would assume I could see multiple copies of these if I had multiple iframes containing SFDC VF Pages -- but if I've only referenced them once that doesn't explain why more copies would be displayed for each VF frame.

The problem is observable after the page is reloaded. When I load the page for the first time with the debugger open, I do not see the issue, and the JS appears normally. It's possible that it happens on initial page load, but I am just referencing the test I just did.

I apologize, but the page is on a SFDC development account that I cannot share openly. 

John J Barton

unread,
Jul 17, 2012, 4:27:46 PM7/17/12
to jordan...@gmail.com, google-chrome-...@googlegroups.com
On Tue, Jul 17, 2012 at 11:46 AM, <jordan...@gmail.com> wrote:
I am running the developer console inside of Salesforce.com, and every time I load a page, I get 7-10 copies of each JS file that is loaded in the 'Scripts' panel! 

 

When I set breakpoints they are also hit 7-10 times (even though the code only seems to be executing once) and the JS runs normally.

Your example screen shot shows minimized code. Do you see the multiple hits on minimized code or on code with one line per statement?

jjb
 

What's going on?

jordan...@gmail.com

unread,
Jul 17, 2012, 5:00:29 PM7/17/12
to google-chrome-...@googlegroups.com, jordan...@gmail.com
jjb-

I get multiple hits on single line statements, attaching a .swf video of me refreshing the page with a breakpoint on a $(document).ready call

It does sound similar to the bug you listed.
chrome_multiple_scripts.swf
Reply all
Reply to author
Forward
0 new messages