CodeArts IDE-远程调试:启动配置示例

时间:2025-02-12 15:04:25

启动配置示例

您可以使用提供的示例作为远程调试场景的示例。

主机应用程序的启动配置是一个常规的Java类配置。它应该包含在vmOptions下提供的特殊参数,以便应用程序使用调试代理启动,并且调试器能够连接到它。

{    "type": "javadbg",    "name": "Java Class",    "request": "launch",    "vmOptions": "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:5005",    "mainClass": {        "name": "com.example.App",        "console": "internal"    }}

远程调试的启动配置应该使用提供给主机应用程序启动配置的连接参数。

{    "type": "javadbg",    "name": "Remote Debug (Attach to remote JVM)",    "request": "launch",    "skipBuild": true,    "remote": {        "debuggerMode": "attach",        "useSocketTransport": true,        "host": "127.0.0.1",        "port": "5005"    }}
support.huaweicloud.com/usermanual-codeartside/codeartside_01_0227.html