简体   繁体   中英

How to debug in the application.js with compressed javascript

I got the following errors,

When I opened the Chrome javascript console,then look insight it.

application.js?body=1:1249

It is just a group of compressed js code

And I've open the in the development.rb

  # Expands the lines which load the assets
  config.assets.debug = true

I can not grep the any piece of the javascript source code in my Rails app.

So I don't know where does it come from ?

How can I fix the unknown error quickly in Rails ?

Thanks

在此处输入图片说明

在此处输入图片说明

Uncaught Error: Graph container element not found application.js?body=1:1249
GET http://www.superfish.com/ws/sf_main.jsp?dlsource=vbqxugf&userId=Ei9nuSYzM8NCWiFeoMKLn6&CTID=addtofeedly net::ERR_BLOCKED_BY_CLIENT 

application.js

//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require bootstrap
//= require tinymce-jquery
//= require raphael
//= require morris
//= require_tree .

Make sure sure you are running rails in development mode and

config.assets.compress = false

is set in development.rb

If you do not manage to get the uncompressed version you the another option:

Compressed files can be made "pretty" in Chrome if you click on the {} symbol. https://developer.chrome.com/devtools/docs/javascript-debugging#pretty-print

之前

后

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