IDEA 11.2.usung glassfish3 中的调试问题
我遇到了与手动更改Glassfish domain.xml for Debug Error<相同的问题/a>
现在它可以从 asadmin 运行
asadmin> start-domain --debug domain1 Waiting for domain1 to start .............. Successfully started the domain : domain1 domain Location: /home/anna/glassfish3/glassfish/domains/domain1 Log File: /home/anna/glassfish3/glassfish/domains/domain1/logs/server.log Admin Port: 4848 Debugging is enabled. The debugging port is: 9009 Command start-domain executed successfully.
但我无法从 ide 进行调试,因为它会生成以下内容
错误的调试设置
如果单击“修复”,则会重写 admin.xml 文件 我该怎么办?
I had the same problem as Manually Changing Glassfish domain.xml for Debug Error
Now it works from asadmin
asadmin> start-domain --debug domain1 Waiting for domain1 to start .............. Successfully started the domain : domain1 domain Location: /home/anna/glassfish3/glassfish/domains/domain1 Log File: /home/anna/glassfish3/glassfish/domains/domain1/logs/server.log Admin Port: 4848 Debugging is enabled. The debugging port is: 9009 Command start-domain executed successfully.
But I can't debug from ide as it produces the following
Wrong debug settings
If to click FIX it would rewrite the admin.xml file What should I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
默认的 GlassFish 调试设置适合远程调试(不适用于本地),即服务器已启动并且在启动时不会暂停,而是随时接受调试器连接。
如果您按“修复”按钮,domain.xml 将被 IDEA 覆盖,但在文件内只有调试设置会受到影响。如果您不想让 IDEA 覆盖
domain.xml
,您可以手动更改调试设置:您应该将server=y,suspend=n
替换为server=n,suspend=y
直接在domain.xml
中或使用 GF 管理控制台。如果您不想影响
domain.xml
,您可以使用IDEA远程运行配置而不是本地配置。在这种情况下,您应该手动启动 GlassFish,然后使用以下命令连接到它:调试模式下的远程运行配置(然后应保留
server=y,suspend=n
)。Default GlassFish debug settings are suitable for remote debugging (not for local), i.e. server is started and is not paused on startup, but just accepts debugger connection at any time.
If you press 'Fix' button the domain.xml will be overwritten by IDEA, but inside the file only the debug setting will be affected. If you don't want to let IDEA overwrite
domain.xml
, you may change the debug settings manually: you should replaceserver=y,suspend=n
withserver=n,suspend=y
either in thedomain.xml
directly or with the GF admin console.If you don't want to affect
domain.xml
, you may use IDEA remote run configuration instead of local one. In this case, you should start GlassFish manually, then connect to it withthe remote run configuration in debug mode (
server=y,suspend=n
should be kept then).Glassfish 说:调试已启用。调试端口为:9009。
有 2 种变体:
您应该更改 Idea 中的运行/调试配置并将调试端口设置为 9009。因为默认的 Idea 调试器使用 40875 端口。

您应该在 glassfish 域中添加自定义调试选项1:
我使用
start-domain --debug
启动了 GF 服务器,现在一切正常!Glassfish says:
Debugging is enabled. The debugging port is: 9009
.There are 2 variants:
You should change your Run/Debug config in Idea and set debug port to 9009. Because default Idea debugger uses 40875 port.

You should add custom debug options in your glassfish domain1:
I started GF server using
start-domain --debug
and now everything is OK!