简体   繁体   中英

Why source maps does not work?

I have chrome 39.0.2171.71, and I have enable source mapping check box enabled, but hx files are empty in debugger, any one can help explain why source mapping does not work?

EDIT

I am not using a server, I am opening the HTML file directly in chrome In chrome network tab, I can see:

(failed)
net::ERR_FILE_NOT_FOUND


file:///C:/Users/samir.s.MOTAHIDAEDU/Documents/haxe/quiz-generator/bin/file:/C:/Users/samir.s.MOTAHIDAEDU/Documents/haxe/quiz-generator/src/com/quiz/Question.hx

I compile the js project, like this:

haxe  -debug --each -lib createjs -lib Actuate -cp src -js C:/Users/samir.s.MOTAHIDAEDU/Documents/haxe/quiz-generator/bin/Quizgenerator.js -main Main -resource quiz.txt@quiz_text_file -lib random

EDIT 2

Where can I set the source map of my project? I think I just have to set the path correctly, I am on Windows 7

I believe this is a Google Chrome bug, since it cannot load the local files.

You could try to compile with the compiler flag -D source-map-content . This include the hx sources as part of the JS source map. For me this works pretty good.

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