IDEA 11.2.usung glassfish3 中的调试问题

发布于 2025-01-04 10:19:19 字数 717 浏览 3 评论 0原文

我遇到了与手动更改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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

听,心雨的声音 2025-01-11 10:19:19

默认的 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 replace server=y,suspend=n with server=n,suspend=y either in the domain.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 with
the remote run configuration in debug mode (server=y,suspend=n should be kept then).

·深蓝 2025-01-11 10:19:19

Glassfish 说:调试已启用。调试端口为:9009。
有 2 种变体:

  1. 您应该更改 Idea 中的运行/调试配置并将调试端口设置为 9009。因为默认的 Idea 调试器使用 40875 端口。
    在此处输入图像描述

  2. 您应该在 glassfish 域中添加自定义调试选项1:

    
    

    在此处输入图像描述

我使用 start-domain --debug 启动了 GF 服务器,现在一切正常!

Glassfish says: Debugging is enabled. The debugging port is: 9009.
There are 2 variants:

  1. You should change your Run/Debug config in Idea and set debug port to 9009. Because default Idea debugger uses 40875 port.
    enter image description here

  2. You should add custom debug options in your glassfish domain1:

    <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=40875" debug-enabled="true">
    

    enter image description here

I started GF server using start-domain --debug and now everything is OK!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文