- 浏览: 1230918 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (718)
- HTML (13)
- JS基础 (23)
- JS应用 (40)
- AJAX (6)
- JSP相关 (12)
- JAVA基础 (52)
- JAVA应用 (74)
- APPLET (11)
- SWING\RCP (2)
- JAVA反射 (6)
- 设计模式 (26)
- 数据库设计 (20)
- Struts (35)
- Struts2 (12)
- Spring (22)
- Hibernate (45)
- Ibatis (18)
- mybatis (3)
- SSH (8)
- UML (5)
- WebService (3)
- XML (16)
- Log4j (7)
- WEB容器 (26)
- 数据结构 (36)
- Linux (34)
- Ruby on Rails (1)
- 其它技术 (27)
- IDE配置 (15)
- 项目实战 (2)
- Oracle (69)
- JAVA报表 (7)
- Android学习 (2)
- 博客链接 (1)
- 网络基础 (1)
- WEB集群 (1)
- .Net开发 (11)
- PB (4)
- 系统构建 (15)
最新评论
-
jnjeC:
牛逼啊哥们,讲得太好了
Maven仓库理解、如何引入本地包、Maven多种方式打可执行jar包 -
九尾狐的yi巴:
很好 感谢!
Itext中文处理(更新版) -
luweifeng1983:
有用的,重启一下嘛。
设置eclipse外部修改文件后自动刷新 -
Master-Gao:
设置了也不管用,怎么破呢?
设置eclipse外部修改文件后自动刷新 -
aigo_h:
锋子还有时间写博客,还是很闲哈!
Add directory entries问题
JPDA DOCUMENT:
http://java.sun.com/j2se/1.4.2/docs/guide/jpda/
http://www.eclipsezone.com/eclipse/forums/t53459.html
相关文章:
http://weblogic.sys-con.com/node/169364
How many times trying to fix a server-side Java problem appeared trivial, but getting to the source of the problem took all the time? A remote debugger attached to a Java application can shorten the defect-discovery times significantly and make the process more enjoyable.
<!-- What is it -->
The Java Debugger
The Java Debugger (jdb) is a dynamic, controlled, assignment-based debugging tool. It helps find and fix bugs in the Java language programs both locally and on the server. To use jdb in a J2EE application server you must first launch it with debugging enabled and attach to the server from the debugger through a JPDA port (Default port is 1044).
The default JPDA options for J2EE servers are as follows:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
The jdb parameters specify the way debugger will operate. For instance transport=dt_socket instructs the JVM that the debugger connections will be made through a socket while the address=1044 parameter informs it that the port number will be 1044. Similarly, if you substitute suspend=y , the JVM starts in suspended mode and stays suspended until a debugger is attached to it. This may be helpful if you want to start debugging as soon as the JVM starts.
Debugging WebLogic
Debugging WebLogic is no different than debugging any other Java remote application. You need to make sure to launch it with the required debugging arguments and attach a debugger. In the case of WebLogic 8.1, you need to add these arguments to the startup script. WebLogic comes with several launch scripts (*.sh and *.cmd) under BEA_HOME/weblogic81/server/bin.
- Locate startWSL.cmd and add the following variable DEBUG_OPTS:
set DEBUG_OPTS = -Xdebug -Xrunjdwp:transport= dt_socket,address=1044,server=y,suspend=n
- Next, insert the new variable to the WebLogic startup command, after "%JAVA_HOME%\bin\java" and preferably before the other options.
- Your startup script should look like:
"%JAVA_HOME%\bin\java" %DEBUG_OPTS% %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS%-Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username= %WLS_USER%-Dweblogic.management.password= %WLS_PW% -Dweblogic.management.server= %ADMIN_URL%-Dweblogic.ProductionModeEnabled= %PRODUCTION_MODE%-Djava.security.policy= "%WL_HOME%\server\lib\weblogic.policy" weblogic.Server
Debugging JBoss
Same as WebLogic, except that you need to change run.bat/run.sh located under JBOSS_HOME/bin.
Linux users should see something similar to this:
$ cd /var/jboss4/bin
$ sh ./run.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/jboss4
JAVA: /usr/java/j2sdk1.4.2_06/bin/java
JAVA_OPTS: -server -Xms128m -Xmx128m -Dprogram.name=run.sh
DEBUG_OPTS = -Xdebug -Xrunjdwp:transport= dt_socket,address=1044,server=y,suspend=n
CLASSPATH: /var/jboss4/bin/run.jar:/usr/java/j2sdk1.4.2_06/lib/tools.jar
=========================================================================
Debugging Tomcat
Again, very much similar to WebLogic and JBoss, except that you need to change catalina.bat/catalina.sh located under TOMCAT_HOME/bin.
Debugger Verification
Now you can launch your application in debug mode. Just to make sure that the server is
listening to port 1044 you can run netstat /a. You should see port 1044 in the list of open ports
(See Figure 1: List of open ports: netstat -a).
Figure 1 List of open ports: netstat -a
The Eclipse Connection
After making sure WebLogic is listening for incoming connections on port 1044, what is left is to tell Eclipse to connect to this port and you are ready to debug.
- In Eclipse, navigate to Run | Debug (See Figure 2: Create new Remote Java Application configuration in Eclipse ).
- Select Remote Java Application , on the left column. Click New , on the bottom of the same column.
- In the Create configuration screen you'll be prompted to enter some values. Start with a meaningful name. In my case that's WebLogic Instance . For Project, select the Java project that contains the source code you want to debug. Leave Connection Type in default, i.e. Standard (Socket Attach) . For Host , enter localhost. If you want to debug a remote server, enter its hostname or IP address. For port, enter 1044 or the port you defined in your WebLogic startup script.
- Click Apply
- Make sure WebLogic instance is running in debug mode. In the same screen click Debug . Eclipse should automatically take you to the Debug perspective and you should see a stack trace in the Debug view.
- If you are not automatically taken to the Debug perspective, select Window | Open Perspective | Other and then click Debug.
Figure 2 Create new Remote Java Application configuration in Eclipse
Figure 3 Breakpoint hit in Eclipse debugger
<span http://Eclipse Debug window should automatically pop-up with the stack pointer on your first breakpoint (See Figure 3: Breakpoint hit in Eclipse's debugger ). After that, you can use all the various functions that the debugger has to offer, namely variable assignments, step-into, drop to frame, etc.
References
- Debugging J2EE Applications
- Connecting to a Remote VM with the Java Remote Application Launcher
- Debugging with the Eclipse Platform
System Information
- Windows 2000
- JDK 1.4.2_03
- Eclipse 3.0
- BEA WebLogic 8.1
- JBoss 4.0.2
- Tomcat 5.0.26
发表评论
-
MyEclipse8.5支持Tomcat7.0
2016-03-08 10:07 743MyEclipse8.5 项目编译环境只能到1.6,没关 ... -
tomcat的URIEncoding的作用
2012-02-10 10:59 1132tomcat5中,为了保证get数据采用UTF8编码,在ser ... -
解决tomcat8080端口常被莫名占用问题
2011-09-27 13:02 888http://topic.csdn.net/u/2010030 ... -
tomcat各配置文件详解
2011-07-09 13:20 1132tomcat各文件夹作用: http://hi.bai ... -
如何在service.xml中配置Oralce连接池
2010-11-03 13:18 927http://blog.163.com/ryan_lz/blo ... -
Tomcat升级到6.0遇到的双引号改单引号问题
2010-08-18 09:08 2460在如下调用时出错: <jsp:include p ... -
TomCat下连接池的创建及部署For DB2 ,ORACLE
2010-08-05 15:21 1663一.Tomcat 下部署DB2连接池 将db2安装目录C:\ ... -
在Tomcat和Eclipse进行远程调试的配置
2010-01-18 12:21 2555引自:http://avar.iteye.com/bl ... -
Tomcat端口占用解决办法及连接到localhost 提示:位于 XDB 的服务器 localhost 要求用户名和密码
2008-04-16 23:11 1584TOMCAT运行提示如下错误: 2008-4-1622: ... -
JAVA学习提高之----Tomcat的静态和动态部署
2008-12-23 16:14 993在Tomcat中部署Java Web应用程序有两种方式:静态部 ... -
JAVA学习提高之----MyEclipse下配置Tomcat过程
2008-12-23 16:27 1132这么些天没有写java了,手有点生疏,重新安装计算机后,配置方 ... -
JAVA学习提高之----如何用Eclipse和Tomcat Plugin来建立一个开发环境(个人实践)
2008-12-23 17:40 1063在我的“WEB服务器”类别的博客中分别介绍了Tomcat的配置 ... -
JAVA基础学习篇----Eclipse进行(JBOSS)远程调试
2009-01-12 14:20 1704原文如下:http://java.chinaitlab.com ... -
JAVA学习提高之---- JBOSS下配置数据源
2009-02-10 17:54 811引用 : http://java.ccidnet.com/a ... -
JAVA学习提高之---- JBOSS远程调试
2009-02-12 09:56 1420view plaincopy to clipboar ... -
JBOSS版本:4.2.2GA 无法通过IP访问,或只能通过127.0.0.1访问的问题解决
2009-02-17 11:08 1305http://feng88724.iteye.com/blog ... -
JBoss 5.0 安装与配置详解
2009-02-24 13:24 1023本文引自:http://blog.csdn.net/allen ... -
关于Jboss版本的问题!
2009-07-28 15:43 1534http://zidane1983.iteye.com/blo ... -
weblogic 配置大全
2009-09-09 16:07 839Weblogic配置大全 用Eclipse MyEclip ... -
JAVA调试JPDA
2009-09-10 16:26 1093http://java.sun.com/j2se/1.4.2/ ...
相关推荐
本文将详细介绍如何使用Eclipse进行远程调试Tomcat服务器的具体步骤。 #### 二、准备工作 在开始之前,请确保已安装以下工具: - Eclipse IDE(推荐使用最新版本) - Apache Tomcat服务器 - JDK(Java Development...
This is the Tenth Edition, of Debugging with GDB: the GNU Source-Level Debugger for GDB (GDB) Version 8.1.90.20180814-git. Copyright © 1988-2018 Free Software Foundation, Inc. Permission is granted...
例如,您可能需要在一个集成或生产环境中调试远程实例的服务器;或者,您的服务器启动脚本可能高度定制化或作为开发流程的一部分而不能更改;最后,MyEclipse 可能根本不直接支持您需要调试的特定服务器。如果您遇到...
Debugging with Fiddler 2012 (英文版 Eric Lawrence 亚马逊5星 热评 畅销书) 网络编程 Web服务开发调试利器 亚马逊11个客户全部评5星,热评畅销书。 Web Services 开发必备。
GDB还支持远程调试,通过`target remote`命令连接到远程服务器进行调试,这对于分布式系统或嵌入式设备的调试非常有用。 十、调试动态库与多线程 GDB能处理动态链接的库,并允许在多线程环境中调试。使用`shared...
根据提供的信息,我们可以总结并详细解释与“debugging_with_gdb(中文版pdf)”相关的知识点。这份文档似乎是一份关于使用 GDB(GNU Debugger)进行调试的手册或指南的中文版 PDF 文件。GDB 是一个非常强大的开源调试...
《Debugging with gdb中文带书签特别版》是一本关于GNU源代码级调试器GDB的中文教程书籍,适配gdb版本6.8.50.***。书中详细介绍了GDB的各种功能、命令以及如何使用该工具进行有效的程序调试。 首先,书中提供了一个...
eclipse 远程 debug 是一种常用的 debugging 技术,用于在远程服务器上调试 Web 应用程序。今天我们将讨论如何使用 eclipse 远程 debug tomcat 和 websphere 的 web 应用。 首先,让我们了解一下 JPDA 的概念。JPDA...
4. **配置Remote Debugging**:点击`Arguments`选项卡,在`VM arguments`中输入`-Xdebug -Xnoagent -Djava.class.path=your_classpath -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:9000`。...
Debugging With GDB 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
本篇文章将详细讲解如何在Eclipse中设置远程调试环境,以便与树莓派进行交互。 首先,确保你已经在Ubuntu主机上配置了gdb-multiarch,这是一个支持多种架构的GNU调试器,可以用来调试不同处理器平台上的程序。gdb-...
使用Weinre进行远程调试该项目的目的是与Weinre建立远程调试会话。安装Weinre远程调试器的此实现作为之上的任务运行。 安装 然后安装此gulp任务的所有依赖项npm installnpm install -g gulp开始gulp 默认情况下,...
远程调试的核心是Delphi的Remote Debugging Monitor(RDM),它是一个轻量级的服务器程序,负责在目标机器上接收和执行来自本地IDE的调试命令。在本地开发环境中,开发者可以像平常一样设置断点、查看变量值和调用...
- **创建远程调试配置**:选择`Remote Java Application`,并设置目标IP地址和端口号(例如9999)。 - **连接并调试**:点击`Apply and Launch`按钮,IDE会尝试连接到远程主机上的应用程序,并等待断点触发。 参考...
本文档将详细介绍如何在Eclipse集成开发环境中设置开发环境,包括如何连接到Pentaho Subversion仓库、检出Pentaho项目、构建这些项目以及使用独立的Java应用服务器和Eclipse IDE进行调试的过程。 #### 前言 ...
《软件调试的艺术》一书,无论是中文版还是英文版,都是深入探讨调试技术的重要资源,尤其对于使用GDB、DDD和Eclipse等工具的开发者来说,更是不可或缺的参考书籍。调试是软件开发过程中的关键环节,它能帮助我们找...
PyCharm提供两种远程调试(Remote Debugging)的方式: 配置远程的解释器(remote interpreter) 配置Python调试服务器(Python Debug Server) 本篇文章主要介绍配置远程解释器,关于配置 python调试服务器,文末也...