# JMap Server

## Preparing the Environment

### Remote debugging environment

It may be useful to have remote debugging for the JMap Server extensions. Once deployed, these extensions are executed directly in the JMap Server process. It is therefore only possible to debug such extensions remotely. The Java Runtime Environment allows for remote debugging by adding a special parameter in the JMap Server environment. You will then be able to perform a server connection from Eclipse and monitor the execution of your JMap extensions step by step.

To activate remote debugging in JMap Server, you must modify the file startjmapserver.vmoptions located in the JMap\_HOME/bin directory. The line starting with -Xdebug should be added.

-Xmx768m

-XX:MaxPermSize=256m

-Djava.awt.headless=true

-Dfile.encoding=ISO-8859-1

-Xdebug

-Xrunjdwp:transport=dt\_socket,server=y,suspend=n,address=8000

Next, you must restart JMap Server. JMap Server will then be in debug mode and it will be awaiting commands from Eclipse. It is not recommended to activate the debug mode in a production environment, as it significantly decreases system performance.

In Eclipse, you must create a remote debugging configuration using the same parameters given in the configuration file shown above (these are the default parameters).

<figure><img src="/files/c2dZJxsC4khLb877ciRY" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/MMIeNLJ61KGGMG6V6R2m" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-jmapserver-lima.k2geospatial.com/jmapserversdk/jmap-pro-and-jmap-server-development/jmap-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
