<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    我會走向何方

    我又該走向何方

    BlogJava 首頁 新隨筆 聯系 聚合 管理
      15 Posts :: 2 Stories :: 17 Comments :: 0 Trackbacks

    How do I configure Tomcat to support remote debugging?

    The short answer is to add the following options when the JVM is started:
    -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
    There are a number of ways you can do this depending on how you normally start Tomcat:

    • Set environment variables JPDA_ADDRESS=8000 and JPDA_TRANSPORT=dt_socket and then start tomcat using catalina jpda start(sh catalina.sh jpda start).
    • If you run Tomcat using service wrapper, check the documentation for the service to determine how to set the required JVM options.
    • If you start Tomcat from within an IDE, check the documentation for the IDE to determine how to set the required JVM options.

    Using catalina start and CATALINA_OPTS

    Alternatively, you can set the java program's command-line arguments for the JPDA settings. For Tomcat, you specify them in the CATALINA_OPTS environment variable and the catalina.sh or catalina.bat script adds the value of the environment variable to the java command that starts Tomcat; for example:

    bash:

    declare -x CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
    $JWSDP_HOME/bin/catalina.sh start

    csh:

    setenv CATALINA_OPTS "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000"
    $JWSDP_HOME/bin/catalina.sh start

    Windows:

    set JPDA_TRANSPORT=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
    %JWSDP_HOME%\bin\catalina start
    The port does not need to be set to 8000, it may be any value appropriate for your system.

    Whilst this is very useful in development it should not be used in production because of both security and performance implications.


    How do I remotely debug Tomcat using Eclipse?

    This answer assumes that you have a project set up with all of the fixings and have some idea of what you're doing in this respect. If not then thats really outside the scope of this topic and more in the scope of you needing to go to eclipse.org and read up on how to use your ide, and maybe practice a little bit before you come back to this. We're also going to assume you have some idea of what a debugger is and how to use one.

    Make sure tomcat is started and that your app is deployed and the sources, etc are all defined as resources in your app. If you have a servlet or something, set a breakpoint where its sure to hit on the next request. Go to "Run->Debug...". Click on "Remote Java Applications", then click "New". Type in the title and all. Notice that port 8000 from the Tomcat instructions. Save and run. Eclipse will connect to the VM that Tomcat is running under. Wow, that was easy! Now go type the url to submit to your servlet or whatever in your browser. Boom you hit the breakpoint right? Have fun!

    posted on 2007-02-06 09:02 hama 閱讀(3111) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 亚洲午夜av影院| 在线观看免费精品国产| 亚洲伊人久久大香线蕉综合图片| 亚洲1区2区3区精华液| 成年私人影院免费视频网站| 亚洲福利电影一区二区?| 亚洲精品视频在线观看免费| 亚洲综合无码一区二区| 免费女人高潮流视频在线观看| 亚洲卡一卡2卡三卡4卡无卡三| 久久精品视频免费播放| 亚洲视频精品在线| 57pao国产成视频免费播放| 91亚洲精品自在在线观看| 我们的2018在线观看免费高清| 亚洲AV无码一区二区三区人| 免费无码不卡视频在线观看| 男性gay黄免费网站| 亚洲日韩中文在线精品第一| 中文字幕久精品免费视频| 亚洲精品中文字幕无码AV| 18禁成年无码免费网站无遮挡| 麻豆亚洲AV成人无码久久精品| 国产精品亚洲αv天堂无码| 免费萌白酱国产一区二区三区| 77777_亚洲午夜久久多人| 最近的中文字幕大全免费版| 国产精品亚洲色婷婷99久久精品| 国产亚洲?V无码?V男人的天堂 | 美女被免费网站91色| 亚洲AV无码一区二区乱孑伦AS| 84pao国产成视频免费播放| 亚洲综合久久精品无码色欲 | 久久精品国产精品亚洲精品| 永久黄色免费网站| 亚洲AV无码专区在线观看成人| 亚洲中文字幕久久精品无码喷水| 91嫩草免费国产永久入口| 色屁屁在线观看视频免费| 综合自拍亚洲综合图不卡区| 成年女人永久免费观看片|