# How to keep haxe log position when target to js?

**URL:** <https://community.haxe.org/t/how-to-keep-haxe-log-position-when-target-to-js/2430>\
**Category:** Haxe\
**Tags:** haxe-js\
**Created:** [May 12, 2020, 2:41am UTC](https://community.haxe.org/t/how-to-keep-haxe-log-position-when-target-to-js/2430 "2020-05-12T02:41:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhan](https://community.haxe.org/user_avatar/community.haxe.org/zhan/32/468_2.png) [@Zhan](https://community.haxe.org/u/Zhan)\
**Post date:** [May 12, 2020, 2:41am UTC](https://community.haxe.org/t/how-to-keep-haxe-log-position-when-target-to-js/2430/1 "2020-05-12T02:41:11Z")

</div>

how to keep haxe log position info when target to js?

[log](https://files.gitter.im/haxetink/public/z7YS/image.png)

it’s seem only got js postion when got exceptions.?

```
 /root/dist/http.js:12826
                return decodeURIComponent(this1.split("+").join(" "));
                    ^

URIError: URI malformed
    at decodeURIComponent (<anonymous>
```

---

<div class="post-metadata">

**Author:** ![kevinresol](https://community.haxe.org/user_avatar/community.haxe.org/kevinresol/32/272_2.png) [@kevinresol](https://community.haxe.org/u/kevinresol)\
**Post date:** [May 12, 2020, 7:20am UTC](https://community.haxe.org/t/how-to-keep-haxe-log-position-when-target-to-js/2430/2 "2020-05-12T07:20:42Z")

</div>

You can generate source-mapping with `-debug`
