2

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

Samir Sabri
  • 937
  • 3
  • 11
  • 26
  • We need more info. How are you compiling the files? How are you serving the files? Does the network inspector say that it is successfully fetching the files? Are there any errors in the console? – loganfsmyth Dec 09 '14 at 07:07
  • Please check EDIT above – Samir Sabri Dec 09 '14 at 07:16
  • It seems that I have to fix the path of hx files, why is that "file:/C:/Users/samir.s.MOTAHIDAEDU/Documents/haxe/quiz-generator/src/" added after "/bin/" folder? – Samir Sabri Dec 09 '14 at 07:18

1 Answers1

4

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.

Mark Knol
  • 9,663
  • 3
  • 29
  • 44
  • 1
    It is confirmed by Google as being a "feature": https://code.google.com/p/chromium/issues/detail?id=446060 – Philippe Jan 12 '15 at 09:56