KonaKart Community Forum

Installation / Configuration => Programming of KonaKart => Topic started by: sergionni on September 27, 2010, 01:38:20 pm

Title: Debug konakart from Eclipse
Post by: sergionni on September 27, 2010, 01:38:20 pm
Hi konakart developers.
How did you tune debugging from Eclipse?

Seems,that StartAndLaunchKonaKart.bat should be started with jpda,but it doesn't help.

Eclipse config:
host:localhost
port:8780

Env. variables:
JPDA_ADDRES = 8780
JPDA_TRANSPORT = dt_socket

Thank you for help.
--
sergionni
Title: Re: Debug konakart from Eclipse
Post by: Brian on September 27, 2010, 01:48:12 pm
FYI  In the next release (v5.2.0.0) there is an ANT target that will create an Eclipse project that you can use to develop the store front easily under Eclipse.
Title: Re: Debug konakart from Eclipse
Post by: sergionni on September 27, 2010, 01:53:56 pm
Quote from: Brian on September 27, 2010, 01:48:12 pm
FYI  In the next release (v5.2.0.0) there is an ANT target that will create an Eclipse project that you can use to develop the store front easily under Eclipse.


Hi Brian, thanks for information. What is preliminary time of this release?

--
sergionni
Title: Re: Debug konakart from Eclipse
Post by: Brian on September 27, 2010, 01:55:33 pm
I'm not sure.  Likely to be mid to end October (2010 !)
Title: Re: Debug konakart from Eclipse
Post by: sergionni on September 28, 2010, 11:47:09 am
Hi Brian, so is there any wiki or howto about Eclipse debug for Konakart?

Thanks.

--
sergei
Title: Re: Debug konakart from Eclipse
Post by: sergionni on September 28, 2010, 12:13:03 pm
Can't launch catalina jpda start even.

Got error:
java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port)
is normally permitted.

But it loosk like port isn't not busy,at least localhost:8780 doesn't respond.

Help,plz :-\
Title: Re: Debug konakart from Eclipse
Post by: Alexandar_Zikic on November 25, 2010, 08:29:43 am
It would seem your port is allready in use, most likely by tomcat itself.
Have you tried a different port than the one tomcat is running on?


However I can offer an alternative to the jdpa approach:

I too develop in eclipse and use remote debugging to connect to the tomcat server.
By adding following line to your startkonakart.bat (or .sh if you run on linux) tomcat will start with a open debug port:

set CATALINA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -XX:PermSize=512m -XX:MaxPermSize=512m -Xmx800m -Dsolr.solr.home="%CATALINA_HOME%/solr"

In Eclipse open the debug configurations and create a new "Remote Java Application", the default values should be fine. Select your eclipse project containing konakart and your finished.

To debug konakart has to be allready started, click the debug configuration you just created and it should work.

While this isn´t as comfortable as "real" debugging it get´s the job done.

Important:

For all of this to work you have to modify the build.xml. In all <javac/> task you need to change the attribute "debug" to "on" or "yes". Without that change ant won´t compile any debug information into the source code (line numbers etc.) and debuging will be almost impossible. I suggest you create a new variable for this and place it in all <javac/> Tasks so you only have to change a single line in the future.