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.
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