Question: New to Eclipse and Solr, I imported apache-solr-3.6.0.war into Eclipse and run Solr with tomcat plugin. Now i want to debug some existing code, however how do i import the Solr source code?

Answer: 
Run solr like this:

```
java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044 start.jar

```

Solr will start, but wait you to connect from Eclipse to continue.

Then in Eclipse, go to:

1. Run / Debug Configurations...
2. Select Remote Java Application
3. Press New button to create a new remote configuration
4. put 1044 on port
5. Click on Debug

This is the standard way to debug remote applications in Java
```
./solr start -p 8983 -f -a "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=0.0.0.0:8000"

```

Start solr with 

1. provide app run on port 8983
2. provide Xrunjdwp:transport=dt\_socket
3. remote ip address 0.0.0.0:8000 
and then go to eclipse
[![solr debug mode config in eclipse](https://i.stack.imgur.com/vyGni.png)](https://i.stack.imgur.com/vyGni.png)