We will be at OWASP APPSEC EUROPE 2017 - Belfast! Let’s talk!MORE INFO

Help Center

Get to know more about our API, Code Annotations and Code Transformations

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 helps you achieve exactly that.

Source maps provide a way of mapping obfuscated code back to its original source code, helping you getting 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/file.js.map

Or, appending a comment to the JavaScript file.

/* Protected JavaScript */
//# sourceMappingURL=/path/to/file.js.map

We chose not to include the sourceMappingURL automaticaly 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.