Debugging.

  1. Clone the source code from the git repo.

  2. In the VSCode:

    1. "File"=>"Preferences"=>"Settings" =>"Node Debug"=>"Auto Attach=On"
    2. "File"=>"Preferences"=>"Settings" =>"Node Debug"=>"Use Preview Auto Attach=Off"
  3. Set necessary break points in the .ts files of the project.

  4. To start debugging the source code just add --dev-suspend flag to each CLI command that runs the SFDMU Plugin.

  5. Starting from the latest node.js versions the --dev-suspend flag might stop to work. In this case you have the alternative way to start debugging. Run the sfdx:run command as following (without sfdx sfdmu:run): ./debug.cmd --sourceusername source@mail.com --targetusername target@gmail.com -- other sfdmu flags...

    This command will start a debug session.

    Note, that if you are working with MacOS, you probably will need first to update the access rights to the file debug.cmd by running the command: chmod 777 ./debug.cmd


See also:

Full export.json format

Last updated on Sa Oct 2022