---
title: "tomcat 远程调试代码"
author: "gjp014"
date: "2017-05-27T15:14:08Z"
tags: ["Linux", "Tomcat"]
categories: ["开源软件"]
slug: "tomcat"
draft: false
lastmod: "2017-05-27T15:16:44Z"
id: 2376746
url: "https://gjp014.iteye.com/blog/2376746"
---

Linux 中的tomcat远程调试代码
1,是要编辑catalina.sh文件。  
而且要改成这 样：CATALINA_OPTS="-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5888"  


2.eclipse 中设置：
A:

![](http://dl2.iteye.com/upload/attachment/0125/0924/942f4d65-f85d-38d2-a9ba-c43a03a09659.png)

b

![](http://dl2.iteye.com/upload/attachment/0125/0926/6ad15cb6-0a22-3676-ab51-ce7ec0dfe801.png)


c

![](http://dl2.iteye.com/upload/attachment/0125/0934/1ae602ab-ed42-3fb4-a2ee-2e731cd0d353.png)