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: 
Without knowing how you imported it exactly: sounds like you are looking for [Source attachment](https://stackoverflow.com/questions/122160/is-there-an-easy-way-to-attach-source-in-eclipse).

It might be better if you use the [Solr source code](http://apache.mirror.clusters.cc/lucene/solr/3.6.0/) directly. Check the README file included in the release, there is an ant task to init eclipse:

> 
> To setup your ide run [...] 'ant eclipse'.
> 
> 
> 

Then all dependencies are loaded using [ivy](http://ant.apache.org/ivy/) and you can run it from within the IDE.
```
./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)