Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible not to stop localserver? #175

Open
CrazyFlasher opened this issue Oct 21, 2019 · 6 comments
Open

Is it possible not to stop localserver? #175

CrazyFlasher opened this issue Oct 21, 2019 · 6 comments
Labels

Comments

@CrazyFlasher
Copy link

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?

@elsassph
Copy link
Contributor

elsassph commented Oct 21, 2019

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

@CrazyFlasher
Copy link
Author

Small correction :)

                js.Browser.window.setTimeout(function() {
			js.Lib.debug(); // breakpoint here
			runner.run(suites);
		}, 5000);

@CrazyFlasher
Copy link
Author

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?

@elsassph
Copy link
Contributor

Maybe -debug should be inside test.hxml

@CrazyFlasher
Copy link
Author

Well, Chome shows that source maps are detected, but I cannot see them, and code is in ugly JS :)
image

@elsassph
Copy link
Contributor

Hmm ok it's a bug: the sourcemap file isn't copied over to the temporary server. You may rise a ticket for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants