/
Visual Studio Code

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!


Related content

How to build SNAP from sources
How to build SNAP from sources
More like this
How to create a bundle of SNAP jars for the usage on the classpath
How to create a bundle of SNAP jars for the usage on the classpath
More like this
Using SNAP in your Java program
Using SNAP in your Java program
More like this
How to create new SNAP modules using SNAP maven archetypes
How to create new SNAP modules using SNAP maven archetypes
Read with this
IntelliJ IDEA
IntelliJ IDEA
More like this
Using SNAP in your Python programs
Using SNAP in your Python programs
Read with this