Source Maps

Protecting your code through code obfuscation intentionally increases the difficulty of debugging your application. A hard to debug application is something you want when someone with bad intentions is examining your application in production, but it is an undesirable attribute when you need to debug your own application. In scenarios where you can only reproduce a problem in production and running the original source code of your application is not an option, there is a solution called Source Maps that help you achieve exactly that.

Source Maps provide a way of mapping obfuscated code back to its original source code, helping you get through the debugging process of obfuscated code as if you were running the original source code.


Jscrambler supports Source Maps either through our Web Application or through our API. Using Source Maps from previous compilation steps is also supported.

Please refer to these pages for more information:

Including Source Maps with your JavaScript files

There are two distinct ways of accomplishing this. Assuming there is only a single file file.js consider the following options:

Using an HTTP Header when serving the JavaScript file.

X-SourceMap: /path/to/

Or, appending a comment to the JavaScript file.

/* Protected JavaScript */

//# sourceMappingURL=/path/to/

We chose not to include the sourceMappingURL automatically for you for security reasons. We don't want the Source Maps to be included by accident in production, so we leave the automation of this step to you.