Natural for Visual Studio Code 1.2.1 | Troubleshooting
 
Troubleshooting
The following problems occur most often when you use Natural for Visual Studio Code in an environment for the first time.
If your problem is not listed here, use the log files of the Natural language server and Natural debug adapter for troubleshooting. Enable file logging with the following preferences:
*natural.languageServer.logging.fileLogging.enabled
*natural.debugAdapter.logging.fileLogging.enabled
The log files are written to:
*%LOCALAPPDATA%/natural-languageserver.log
*%LOCALAPPDATA%/natural-debugadapter.log
See also Logging Preferences.
Syntax highlighting for Natural sources does not work
Cause
The language server did not start in the background.
Solution
Make sure that the JAVA_HOME environment variable points to Java 21 or later. See Required Environment.
Syntax highlighting works, but executing and building the application fails
Cause
You opened a project folder directly, and its folder structure does not match the expected structure.
Solution
Open the parent folder of the project, which represents the workspace root folder. See Preparing the Workspace.
Natural projects are not visible when you open a workspace folder
Cause
Visual Studio Code supports physical folders only, but the workspace folder contains a linked NaturalONE project.
Solution
Clone the Git repository that contains the Natural projects and open the parent folder of the projects, which represents the workspace folder.
Output does not work when you run or debug a Natural application
Cause
Tomcat does not listen on port 8080, communication port 3500 is already in use, or the JAVA_HOME environment variable is not set correctly.
Solution
*Configure Tomcat to use a different port. See Execution Preferences.
*Change natural.io.port preference from 3500 to an available port. See Execution Preferences.
*Make sure that the JAVA_HOME environment variable points to Java 21 or later.
A "connection reset" error appears at startup
Cause
The SSL/TLS setting in the launch configuration and the used Natural Development Server (NDV) do not match.
Solution
Check the active launch configuration. Make sure that SSL/TLS is enabled if the NDV server uses SSL. Make sure that SSL/TLS is disabled if the NDV server does not use SSL/TLS. See NatDebugDefault Configuration.
Build, Execute, or Debug commands fail
Cause
You have not selected a launch for the project, or the launch does not match the project.
Solution
Select the launch in the Environment section of the Natural Properties Manager. or adapt it with maintain launches. See Maintaining Launches.
Project settings and deploy.xml do not match
Cause
The settings in the .natural file of the project and its deploy.xml file do not match, for example, the steplib settings.
Solution
Open the Natural Properties Manager for the project and select the Synchronize button in the view header. Before you select the button, hover over it to see the inconsistencies it will resolve.
Unexpected Natural errors occur when you execute or build the application
Cause
The .natural and deploy.xml files of the project do not contain the environment information required to execute and build the application, for example, the Natural Security or steplib settings.
Solution
Make sure that the application works in NaturalONE and that the .natural and deploy.xml files contain the current environment settings. For the .natural file, select Store new Defaults in the project properties. For the deploy.xml file, regenerate the file with the Deploy Natural Ant wizard.
Source modifications are not uploaded to the Natural server
Cause
The deploy.xml file contains incorrect property values for the workspace root directory or the project name.
Solution
Correct the natural.ant.project.rootdir and natural.ant.project.name properties in the deploy.xml file of the project.