Java 无法在调试模式下启动 hybris
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18712637/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Not able to start hybris in debug mode
提问by Joy
When tying to start Hybris in debug mode using Eclipse Kepler showing error
使用 Eclipse Kepler 在调试模式下启动 Hybris 时显示错误
“Failed to connect to remote VM. Connection refused.
Connection refused: connect”
Even I tried by changing the default port also
即使我也尝试更改默认端口
tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
but showing the same error. Any help/suggestion will be appreciated.
但显示相同的错误。任何帮助/建议将不胜感激。
回答by k3b
which version of hybris are you using? How do you currently start hybris? Is hybris and eclipse on the same machine? do you have admin privileges?
您使用的是哪个版本的 hybris?您目前如何启动 hybris?hybris 和 eclipse 是在同一台机器上吗?你有管理员权限吗?
i am using hybris 3.1 with eclipse-helios.
我正在使用带有 eclipse-helios 的 hybris 3.1。
First i start hybris withouteclipse in debugmode: using ...\platform\tomcat-6\bin\debug.bat at commandline.
首先,我在调试模式下在没有Eclipse 的情况下启动 hybris :在命令行中使用 ...\platform\tomcat-6\bin\debug.bat。
After that i start debugging by attaching the eclipse-debugger to that debugmode-running hybris instance using a eclipse debug configuration "remote java application" with connection Properties: host=localhost, port=8000.
之后,我通过使用 eclipse 调试配置“远程 java 应用程序”和连接属性:host=localhost, port=8000 将 eclipse-debugger 附加到那个 debugmode-running hybris 实例来开始调试。
回答by Abed Yaseen
you should run your hybris server with -debug option in console and by default connect debugger to port 9000 . that worked with me
您应该在控制台中使用 -debug 选项运行您的 hybris 服务器,并且默认情况下将调试器连接到端口 9000 。和我一起工作的
回答by shravs
Go to ...\hybris\bin\platform and run hybrisserver.bat debug in windows or hybrisserver.sh in unix
转到 ...\hybris\bin\platform 并在 windows 中运行 hybrisserver.bat debug 或在 unix 中运行 hybrisserver.sh
This will start the hybris server in debug mode
这将在调试模式下启动 hybris 服务器
During server start up, you can see a line that says hybris server starting in debug mode at the very start.
在服务器启动期间,您可以看到一行显示 hybris 服务器一开始就以调试模式启动。
回答by manish
Please change first debug port using below property
请使用以下属性更改第一个调试端口
tomcat.debug.port=<please provide port which is free>
in local.properties
file then start server using
在local.properties
文件中然后使用启动服务器
hybrisserver.bat debug
hybrisserver.bat 调试
回答by Marc
Running hybris\bin\platform\hybrisserver.bat debug
should start your server ready to debug but all it actually does is use the configuration in hybris\bin\platform\tomcat\conf\wrapper-debug.conf
. So you need to check that file and add the following lines if they are missing:
运行hybris\bin\platform\hybrisserver.bat debug
应该启动您的服务器准备调试,但它实际所做的只是使用hybris\bin\platform\tomcat\conf\wrapper-debug.conf
. 因此,您需要检查该文件并在缺少以下行时添加它们:
wrapper.java.additional.34=-Xdebug
wrapper.java.additional.35=-Xnoagent
wrapper.java.additional.36=-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
Note the numbers (e.g. 34, 35, 36) need to be adapted according to which additional lines you already have in your .conf file.
请注意,数字(例如 34、35、36)需要根据 .conf 文件中已有的附加行进行调整。
Start hybrisserver.bat debug
and wait till it's fully started. Then you can connect on port 80 (set in IntellJ under Run -> Edit Configurations -> Remote...)
启动hybrisserver.bat debug
并等待它完全启动。然后你可以在端口 80 上连接(在 IntellJ 中设置 Run -> Edit Configurations -> Remote...)
回答by marcos
Open file hybris\bin\platform\tomcat\conf\wrapper-debug.conf
and go to the following line:
打开文件hybris\bin\platform\tomcat\conf\wrapper-debug.conf
并转到以下行:
wrapper.java.additional.36=-Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
In that change port number 8000 to 8001.
在该更改端口号 8000 到 8001。
回答by Atul Jain
- Place tomcat.debug.port=into local.properties.
- Place tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=port_number>,suspend=n -Xverify:none -DforceANSI=trueinto local.properties
- Go to eclipse Debug Configuration, set port same as in local.properties.
- In commons tab check Debug option
- Place tomcat.enable.debug=trueinto catalina.properties
- Then start server hybrisserver.bat debug (For Windows OS).
- 将tomcat.debug.port=放入 local.properties。
- 将tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=port_number>,suspend=n -Xverify:none -DforceANSI=true放入 local.properties
- 转到 Eclipse Debug Configuration,设置与 local.properties 中相同的端口。
- 在公共选项卡中检查调试选项
- 将tomcat.enable.debug=true放入 catalina.properties
- 然后启动服务器 hybrisserver.bat 调试(对于 Windows 操作系统)。