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.

Error Monitoring

Error monitoring (also referred to as error tracking or error logging) is a system that tracks the bugs and errors in your application, usually monitoring production environments. The benefits of error monitoring such as enhanced customer experience and reduction in revenue loss make it a common practice across the industry for any type of application

The code obfuscation makes your error stack traces very difficult for your developers to understand where the bug comes from.

Most error monitoring systems can consume source-maps and display exactly where the bug is in the original source code.