How to make CSS sourcemapping work in Chrome with Compass (SASS)

只愿长相守 提交于 2019-11-29 12:46:25

You've missed a few steps :

Chrome < 53

  1. Enable CSS source maps in Chrome (DevTools > Settings > Preferences)
  2. Enable auto-reload generated CSS source map in Chrome (DevTools > Settings > General)
  3. Add your project folder in the Chrome workspace (DevTools > Settings > Workspace)
  4. Chrome ask you for a full access to this folder, accept
  5. In the Sources tab, find your generated CSS file, right click on it and choose Map to network ressource, and select the same file name in the shown dropdown
  6. Chrome ask you to reload DevTools, accept

Chrome >= 53

  1. Enable CSS source maps in Chrome (DevTools > Settings > Preferences > Sources)
  2. In the Sources tab, right click anywhere and choose Add folder to workspace, and select your project folder.
  3. Chrome ask you for a full access to this folder, accept
  4. In the Sources tab, find your generated CSS file, right click on it and chosse Map to file system ressource, and select the same file name in the shown dropdown

Now, you can change your Sass file in your favorite editor (you then need to watch it, or relaunch sass command), or directly in Chrome Devtools: select your file, edit it and save it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!