Hello fellow Haxe developers. Recently I've encounter some issues regarding traces in JS.
TL;DR
As codebase is getting bigger traces are no longer simple `console.log()` calls but they're using shared `js_Boot__trace()` function and it's pain to debug.
So here's the full story:
Starting with just 2 classes, Main and Lulz.
class Main
{
public function new()
{
trace("Oh! Hai!");
var lulz:Lulz = new Lulz();
}
static function main()
{
new Main();
}
}
class Lulz
{
public function new()
{
trace("Well, Hello there!");
}
}
After compilation I'm getting nice traces in JS console.
Not bad, but compiling with `-debug` flag is even better:
This is awesome, I don;t need to look at ugly JS code and clicking this thing on the right is taking me right away to proper .hx class. Neat and super useful for debugging.
Now lets FF a bit. Project is using some other libs and codebase is getting bigger and bigger.
So what do we have now?
Uh, oh! What ?
So now instead of my dummy files it's pointing to Boot.hx all the time (where the console log is). I can see the class name and line in the message now but this is super annoying during debugging. I can no longer click but have to manually browse to this file if I want to set breakpoint etc.
Does any one came across same thing or do know how to avoid this kind of behaviour?
Any help would be appreciated.
Cheers,
Slawek