Visual Studio Code

To use VS Code with SNAP first install the "Java Extension Pack" extension that provides all tools needed to interact with a Java project.

Once installed open the project folder and add the launcher file configuration by clicking the "Debug Icon" on the left toolbar and by clicking "create a launch.json file".

Then add the following configuration to the configuration settings:

"configurations": [
{
"type": "java",
"name": "SNAP Desktop",
"request": "launch",
"mainClass": "org.esa.snap.nbexec.Launcher",
"cwd": "${workspaceFolder}/snap-application/target/snap",
"vmArgs": "-Dsun.java2d.noddraw=true -Dsun.awt.nopixfmt=true -Dsun.java2d.dpiaware=false -Dorg.netbeans.level=INFO -Dsnap.debug=true -Xmx4G",
"args": [
"--userdir", "{workspaceFolder}/snap-application/target/userdir",
"--clusters", "${workspaceFolder}/../s2tbx/s2tbx-kit/target/netbeans_clusters/s2tbx",
"--patches", "${workspaceFolder}/../snap-engine/$/target/classes:${workspaceFolder}/../s2tbx/$/target/classes"
],
}
]

Finally lunch "SNAP Desktop" from the debug panel or from the status bar!