vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
604 stars 166 forks source link

Asserts in client module are compiled as debugger calls #2386

Open alvarezguille opened 7 years ago

alvarezguille commented 7 years ago

When reproducing #2385 you can notice that if you have dev tools open then js execution is stopped as there is a call debugger; call.

Legioth commented 7 years ago

I think we should by default provide two different builds of the client engine. One that is used in production mode that is compiled as obfuscated and without asserts, and then one that is used in development mode that is pretty compiled and includes asserts.

Would that make sense?

As it stands now, it really doesn't make any sense that you hit a debugger; statement and just see obfuscated code.

alvarezguille commented 7 years ago

Obfuscated or not most flow users won't care about flow StateTree or other internal logic most of the time. But that's just my feeling. Having a non obfuscated version could be helpful for reporting issues.

Legioth commented 7 years ago

Those asserts aren't supposed to happen at all, so from my point of view it's only a positive thing that they are so annoying (during development) that the developer won't ignore reporting the issue :)