# Unable to debug source code for babylonjs using webpack

**URL:** <https://forum.babylonjs.com/t/unable-to-debug-source-code-for-babylonjs-using-webpack/4889>\
**Category:** Questions\
**Created:** [August 2, 2019, 3:48am UTC](https://forum.babylonjs.com/t/unable-to-debug-source-code-for-babylonjs-using-webpack/4889 "2019-08-02T03:48:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChenX](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@ChenX](https://forum.babylonjs.com/u/ChenX)\
**Post date:** [August 2, 2019, 3:48am UTC](https://forum.babylonjs.com/t/unable-to-debug-source-code-for-babylonjs-using-webpack/4889/1 "2019-08-02T03:48:18Z")

</div>

> **[FishOrBear/BabylonTypescriptWebpack](https://github.com/FishOrBear/BabylonTypescriptWebpack)**
>
> Contribute to FishOrBear/BabylonTypescriptWebpack development by creating an account on GitHub.

I created a project and packaged it using webpack.

But I can’t enter the .ts file when debugging, I can only enter the .js file.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/1/1b2bb8880ed4e07cb980e25cd8e0e7caf8f95850.png)

This should be a problem with webpack. I tried to add `soucemap-loader` and it didn’t solve the problem.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [August 2, 2019, 3:27pm UTC](https://forum.babylonjs.com/t/unable-to-debug-source-code-for-babylonjs-using-webpack/4889/2 "2019-08-02T15:27:25Z")

</div>

Pinging @sebavan

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [August 2, 2019, 5:23pm UTC](https://forum.babylonjs.com/t/unable-to-debug-source-code-for-babylonjs-using-webpack/4889/3 "2019-08-02T17:23:54Z")

</div>

It is probably because your node\_modules folder is not visible from you local server. It looks like you are serving everything from the src folder ?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [August 2, 2019, 6:13pm UTC](https://forum.babylonjs.com/t/unable-to-debug-source-code-for-babylonjs-using-webpack/4889/4 "2019-08-02T18:13:54Z")

</div>

Actually in your project if you uncomment the source-map-loader, it seems to work:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/b68b521d8337c7c5c99afcfe6375bf460ac675ba.png)

---

<div class="post-metadata">

**Author:** ![ChenX](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@ChenX](https://forum.babylonjs.com/u/ChenX)\
**Post date:** [August 3, 2019, 12:17am UTC](https://forum.babylonjs.com/t/unable-to-debug-source-code-for-babylonjs-using-webpack/4889/5 "2019-08-03T00:17:36Z")

</div>

After uncommenting, you can see the ts file in the local service, but when using `F11` debugging, you can’t enter the correct ts file, but it destroys the debugging information, which is worse than entering the `js` file.
