Using sourcemaps
  • 26 Dec 2024
  • 1 Minute à lire
  • Sombre
    Lumière
  • PDF

Using sourcemaps

  • Sombre
    Lumière
  • PDF

The content is currently unavailable in French. You are viewing the default English version.
Résumé de l’article

Sourcemaps are a debugging aid that map the obfuscated code back to the original unobfuscated input. The mapping includes symbol names mapped from the renamed, obfuscated value back to the original name and also the source location (line and column number) back to the original source file. It’s imperative that these files are not distributed within the protected application or much of the obfuscation benefit will be lost. A comment is embedded in the protected file to indicate the location of the sourcemap file so that if it is opened in a debugger it will be automatically read and used. Consider though that your code may still be protected with the anti-debug control and so very difficult to debug. Sourcemap generation is disabled by default but can be enabled via the --sourcemap command line option.

Sourcemap configuration options

Command line option

JSON configuration

Purpose

--sourcemap

"sourcemaps": { "enabled": true }

Enables the production of sourcemaps for eachprotected file

"sourcemaps": { "outputPath": "mypath/maps" }

Set the root directory for the output of the generated .map files. By default this is the same as the output directory or file. Map files are the same name as the output file but have .map appended to the end.


Cet article vous a-t-il été utile ?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Ozzy, facilitant la découverte de connaissances grâce à l’intelligence conversationnelle