How to start debug mode from command prompt for apache tomcat server?

前端 未结 9 1812
情深已故
情深已故 2020-12-02 05:11

I want to start debug mode for my application. But I need to start the debug mode from command prompt. Is it possible ? And will the procedure vary between tomcat 5.5 to tom

相关标签:
9条回答
  • 2020-12-02 05:40
    On windows
    $ catalina.bat jpda start
    
    On Linux/Unix
    $ catalina.sh jpda start
    

    More info ----> https://cwiki.apache.org/confluence/display/TOMCAT/Developing

    0 讨论(0)
  • 2020-12-02 05:42

    There are two ways to run tomcat in debug mode

    1. Using jdpa run

    2. Using JAVA_OPTS

    First setup the environment. Then start the server using following commands.

    export JPDA_ADDRESS=8000
    
    export JPDA_TRANSPORT=dt_socket
    
    %TOMCAT_HOME%/bin/catalina.sh jpda start
    
    sudo catalina.sh jpda start

    refer this article for more information this is clearly define it

    0 讨论(0)
  • 2020-12-02 05:44

    Inside catalina.bat set the port on which you wish to start the debugger

    if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
    set JPDA_ADDRESS=9001
    

    Then you can simply start the debugger with

    catalina.bat jpda 
    

    Now from Eclipse or IDEA select remote debugging and start start debugging by connecting to port 9001.

    0 讨论(0)
提交回复
热议问题