简体   繁体   中英

Chrome Dev Tools - My javascript is cut off

I have a MVC site with a large amount of Javascript in the page, and it begins towards the bottom. It is almost 500 lines of Javascript but when I right click -> inspect element and scroll to it I only see 260 lines with an ellipses (...) halfway through a method call (see the image).

This is causing a problem because when I use CTRL+F to find a line of Javascript beyond this point it is not found. Furthermore when I try to edit a line of Javascript by doubleclicking it the entire script gets highlighted and it jumps to the top, meaning I have to scroll down.

Has something changed with a recent update or have I enabled some setting by mistake somewhere? I'm sure it wasn't like this before.

在此输入图像描述

UPDATE: I have confirmed this on a friend's machine.

Use the "sources" tab. There you have full search functionality ( ctrl + f on win, cmd + f on mac).

If you have such an enormous <script> tag, I'd suggest to change it to its own .js file.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM