Jahia in English > How to Debug the...

0 (0 Good)
0 (0 Bad)

How to Debug the jahia project

by  Wasik »  2018/03/13 13:33

Hi,

I am new to the Jahia. Can anyone tell me what is the process for debugging the jahia code?

 

Wasik
Number of messages  4
Not registered
0 (0 Good)
0 (0 Bad)

Re: How to Debug the jahia project

by  shyrkov »  2018/03/13 17:56

Hello Wasik,

 

would you like to debug the DX core code or the code of your custom module? Are you running DX on a Tomcat instance?

 

Kind regards

Sergiy

  • Re: How to Debug the jahia project
    2018/03/13 17:56

    shyrkov <p>Hello Wasik,</p> <p>&nbsp;</p> <p>would you like to debug the DX core code or the code of your custom module? Are you running DX on a Tomcat instance?</p> <p>&nbsp;</p> <p>Kind regards</p> <p>Sergiy</p>

  • Number of messages  407
    Registration date Mar 13, 2018
    0 (0 Good)
    0 (0 Bad)

    Re: Re: How to Debug the jahia project

    by  Wasik »  2018/03/14 12:40

    Hi,

     

    Yes, I am execution the DX in tomcat and I want to debug my custom modules.

     

     

    Thanks & Regards 

    Wasik 

    Wasik
    Number of messages  4
    Not registered
    1 (1 Good)
    0 (0 Bad)

    Re: Re: Re: How to Debug the jahia project

    by  shyrkov »  2018/03/14 15:19

    Hello Wasik,

    you could use remote Java debugging, which is supported by all Jav IDEs (Eclipse, IntelliJ IDEA, NetBeans).

    Please, add the following lines to your <tomcat>/bin/setenv.sh file (or setenv.bat if you are using Windows):

    1) If you are on Linux/MacOS:

    CATALINA_OPTS="$CATALINA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

    export CATALINA_OPTS

    2) If you are on Windows:
    set CATALINA_OPTS=%CATALINA_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

     

    Restart your DX Tomcat and create a remote debugging configuration in your IDE (you can google for something like "How To Debug a Remote Java Application" for your IDE type).

     

    Kind regards

    Sergiy

     

  • Re: Re: Re: How to Debug the jahia project
    2018/04/25 15:18

    shyrkov <p>Hello Wasik,</p> <p>you could use remote Java debugging, which is supported by all Jav IDEs (Eclipse, IntelliJ IDEA, NetBeans).</p> <p>Please, add the following lines to your &lt;tomcat&gt;/bin/setenv.sh file (or setenv.bat if you are using Windows):</p> <p>1) If you are on Linux/MacOS:</p> <p>CATALINA_OPTS=&quot;$CATALINA_OPTS&nbsp;-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n&quot;</p> <p>export CATALINA_OPTS</p> <p>2) If you are on Windows:<br /> set CATALINA_OPTS=%CATALINA_OPTS% -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n</p> <p>&nbsp;</p> <p>Restart your DX Tomcat and create a remote debugging configuration in your IDE (you can google for something like &quot;How To Debug a Remote Java Application&quot; for your IDE type).</p> <p>&nbsp;</p> <p>Kind regards</p> <p>Sergiy</p> <p>&nbsp;</p>

  • Number of messages  407
    Registration date Mar 14, 2018
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re: How to Debug the jahia project

    by  Wasik »  2018/03/15 07:08

    Hi Sergiy,

    I did what you told me. Now I am getting new Error with a popup like.

     

    Failed to connect to remote VM
    com.sun.jdi.connect.spi.ClosedConnectionException

     

    Thanks & Regards

    Wasik

     

     

    Wasik
    Number of messages  4
    Not registered
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Re: Re: Re: How to Debug the jahia project

    by  shyrkov »  2018/03/15 11:48

    Hello,

    could you, please, check that the port number for remote debugging, you've configured in setenv.sh/bat (address=8000) is the one, you specify when configuring remote debugging from your IDE?

  • Re: Re: Re: Re: Re: How to Debug the jahia project
    2018/03/15 11:48

    shyrkov <p>Hello,</p> <p>could you, please, check that the port number for remote debugging, you&#39;ve configured in setenv.sh/bat (address=8000) is the one, you specify when configuring remote debugging from your IDE?</p>

  • Number of messages  407
    Registration date Mar 15, 2018
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page