You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by stockii <st...@shopgate.com> on 2010/08/21 14:27:21 UTC

How to Debug Sol-Code in Eclipse ?!

Hello..

Can anyone give me some tipps to debug the solr-code in Eclipse ? or do i
need apache-Ant to do this ? 

thhx =) 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1262050.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by stockii <st...@shopgate.com>.
"ant package"  

BUILD FAILED run program "perl" ...

it`s necessary to install perl on my computer ?!

-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1291992.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by Bernd Fehling <be...@uni-bielefeld.de>.

> 
> can nobody help me or want :D

As already someone said:
- install Eclipse
- add Jetty Webapp Plugin to Eclipse
- add svn plugin to Eclipse
- download with svn the repository from trunk
- change to lucene dir and run "ant package"
- change to solr dir and run "ant dist"
- setup with "Run configure..." a Jetty Webapp for solr
- start debugging :-)

If debugging below solr level into lucene level just add
lucene src path to debugging source.

May be you should read:
http://www.lucidimagination.com/developers/articles/setting-up-apache-solr-in-eclipse

Regards,
Bernd

Re: How to Debug Sol-Code in Eclipse ?!

Posted by stockii <st...@shopgate.com>.
can nobody help me or want :D
-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1288705.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by stockii <st...@shopgate.com>.
thx, for your help. now it works fine. its very simple when you kno how :D
haha

i try bernds suggest =) 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1296175.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by Drew Farris <dr...@apache.org>.
On Sun, Aug 22, 2010 at 8:29 PM, stockii <st...@shopgate.com> wrote:
>
> okay, thx. but it want work =(
>
> i checkout solr1.4.1 as dynamic web project into eclipse. startet jetty with
> XDebug. In eclpise i add WebLogic exactly how the tutorial shows but eclipse
> cannot connect =(
>
> any idea what im doing wrong ?

No idea. Check your arguments and verify that the port is the same on
both the command-line you're using to start jetty and in the eclipse
remote debugger configuration. Make sure you don't have a firewall
running on your machine because that might block the connection from
eclipse to jetty.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by stockii <st...@shopgate.com>.
okay, thx. but it want work =(

i checkout solr1.4.1 as dynamic web project into eclipse. startet jetty with
XDebug. In eclpise i add WebLogic exactly how the tutorial shows but eclipse
cannot connect =(

any idea what im doing wrong ? 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1282560.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by Drew Farris <dr...@apache.org>.
After a build of what you have checked out, there's an instance you
can run in the examples directory within the solr directory.

1.4.1 can be checked out from
http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.4.1/

On Sun, Aug 22, 2010 at 6:01 PM, stockii <st...@shopgate.com> wrote:
>
> im stupid. XD
>
> how get i the revsion of the solr 1.4.1 or do i nee build an war from my
> snv-checkout ?
> --
> View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1281253.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: How to Debug Sol-Code in Eclipse ?!

Posted by stockii <st...@shopgate.com>.
im stupid. XD 

how get i the revsion of the solr 1.4.1 or do i nee build an war from my
snv-checkout ? 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1281253.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by stockii <st...@shopgate.com>.
wich revision is the revision of 1.4.1 ? 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1280956.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by stockii <st...@shopgate.com>.
oha, thx i will try it =) 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1278704.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by Drew Farris <dr...@apache.org>.
On Sun, Aug 22, 2010 at 8:22 AM, stockii <st...@shopgate.com> wrote:
>
> thx for you reply.
>
> i dont want to test my own classes in unittest. i try to understand how solr
> works , because i write a little text about solr and lucene. so i want go
> through the code, step by step and find out on which places is solr using
> lucene.
>
> when i can debug the code its easyer ;-)

How about using remote debugging?

I assume you have the solr/lucene code set up in a project in eclipse.

Start solr with:
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
-jar start.jar

And then follow the instructions to attach to the debugger described here:
http://www.eclipsezone.com/eclipse/forums/t53459.html
(The instructions are for weblogic, but everything in the section
titled "The Eclipse Connection" is generally relevant.)

Drew

Re: How to Debug Sol-Code in Eclipse ?!

Posted by stockii <st...@shopgate.com>.
1. did you mean solr war ? or all libs in /trunk/solr/lib/
2. what is the revision of the actual 1.4.1 ?
3. EmbededSolrServer ? what should do this little programm ? 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1275295.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by Geert-Jan Brits <gb...@gmail.com>.
1. download solr lib and import them in your project.
2. download solr source-code of the same version and attach in to the
libraries. (I haven't got eclipse open but it is something like project ->
settings -> jre/libraries?)
3. write a small program yourself which calls EmbededSolrServer and
step-through/debug the source-code from there. It works just like it is your
own source-code.

HTH,
Geert-Jan

2010/8/22 stockii <st...@shopgate.com>

>
> thx for you reply.
>
> i dont want to test my own classes in unittest. i try to understand how
> solr
> works , because i write a little text about solr and lucene. so i want go
> through the code, step by step and find out on which places is solr using
> lucene.
>
> when i can debug the code its easyer ;-)
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1274285.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: How to Debug Sol-Code in Eclipse ?!

Posted by stockii <st...@shopgate.com>.
thx for you reply.

i dont want to test my own classes in unittest. i try to understand how solr
works , because i write a little text about solr and lucene. so i want go
through the code, step by step and find out on which places is solr using
lucene. 

when i can debug the code its easyer ;-)
-- 
View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1274285.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to Debug Sol-Code in Eclipse ?!

Posted by Lance Norskog <go...@gmail.com>.
Running unit tests is easy, once you set the right 'current directory'
so that unit tests can find their resource files. I have found that if
I get a full set of unit tests for something, I don't have to debug it
in the full app.

Running the whole thing as a servlet has the whole servlet engine
setup thing, which I avoid.

Running as EmbeddedSolr might be easy, I haven't tried it.

I usually make a separate empty Java project and import source and
libs as needed. I do a lot of  'search everything for this string' so
having the whole source tree in the project just slows me down. This
does remove the ability to use the svn/git management, but I don't
mind that.

On Sat, Aug 21, 2010 at 5:27 AM, stockii <st...@shopgate.com> wrote:
>
> Hello..
>
> Can anyone give me some tipps to debug the solr-code in Eclipse ? or do i
> need apache-Ant to do this ?
>
> thhx =)
> --
> View this message in context: http://lucene.472066.n3.nabble.com/How-to-Debug-Sol-Code-in-Eclipse-tp1262050p1262050.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Lance Norskog
goksron@gmail.com