Source maps should work on JS without newlines. This sounds like a bug
in the generator.
Bruno
On 07/26/2013 08:11 AM, Huck wrote:
> (sorry for repost, browser posted the message before it was completed)
>
> Since there are no answers i figure my question might not have been
> clear, so i will try to refine it and see if ti helps.
>
> so, when using source mappings with javascript target, there are a few
> differences in the generated code structure that cause annoying behavior
> while debugging. example, this haxe code:
>
> |
> if(r)
> {
> trace("Hello World !");
> }
> else
> {
> trace("Hello World 2!");
> }
> |
>
> on multiple lines will generate the following javascript code: (note
> that it is on a single line):
>
> |
> |*if(r)console.log("Hello World !");elseconsole.log("Hello World 2!");*
> |
> |
>
> now the issue with that is when debugging with source mappings in
> chrome, the breakpoints will not go to |trace("Hello World !");
> or ||trace("Hello World 2!");depending on runtime branching because the
> underlying javascript is on a single line, so the breakpoint sticks to
> the "if" line.
>
> was wondering if there was an option to tell the compiler to stick to
> the format of the haxe code when generating target code? in short,
> expecting this javascript:
> |
> |
> |*if(r){
> console.log("Hello World !");
> }
> else{
> console.log("Hello World 2!");*
> }
> |
> |
> |
> thanks
>
> |
>
> --
> To post to this group
haxe...@googlegroups.com
>
http://groups.google.com/group/haxelang?hl=en
> ---
> You received this message because you are subscribed to the Google
> Groups "Haxe" group.
> For more options, visit
https://groups.google.com/groups/opt_out.