Open CrazyFlasher opened 4 years ago
My usual trick is to edit TestMain
(which isn't auto-regenerated) and change:
runner.run(suites);
with:
js.Browser.setTimeout(function() {
js.Lib.debug(); // breakpoint here
runner.run(suites);
}, 5000); // give me 5s to open devtools
Small correction :)
js.Browser.window.setTimeout(function() {
js.Lib.debug(); // breakpoint here
runner.run(suites);
}, 5000);
For some reason source maps are not generated.
haxelib run munit test test.hxml -js -debug
- is it correct command for debugging source for js?
Maybe -debug
should be inside test.hxml
Well, Chome shows that source maps are detected, but I cannot see them, and code is in ugly JS :)
Hmm ok it's a bug: the sourcemap file isn't copied over to the temporary server. You may rise a ticket for that.
When I run
haxelib run munit test test.hxml -js
Local server starts, does tests and stop. But I want to refresh page to enable breakpoints in tests. Is it possible not to stop localserver? Or are there any other ways to enable breakpoints for js build?