This is an automated email from the ASF dual-hosted git repository.
zhaojinchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 19ad0c473f0 Ehance remote debug docs (#28622)
19ad0c473f0 is described below
commit 19ad0c473f0381b819728d1206f76ee6e23ac167
Author: 孙念君 Nianjun Sun <[email protected]>
AuthorDate: Fri Oct 6 14:37:35 2023 +0800
Ehance remote debug docs (#28622)
* Refactor : refactor the document
* Refactor : refactor the document
---
docs/document/content/test-manual/integration-test/_index.cn.md | 6 +++---
docs/document/content/test-manual/integration-test/_index.en.md | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/document/content/test-manual/integration-test/_index.cn.md
b/docs/document/content/test-manual/integration-test/_index.cn.md
index 784474a3f69..a49c9329b80 100644
--- a/docs/document/content/test-manual/integration-test/_index.cn.md
+++ b/docs/document/content/test-manual/integration-test/_index.cn.md
@@ -177,7 +177,7 @@ IDEA -> Run -> Edit Configurations -> Add New Configuration
-> Remote JVM Debug
编辑对应的信息:
- Name:一个描述性的名字,例如 e2e-debug。
- Host:可以访问 docker 的 IP,例如 127.0.0.1。
- - Port:调试端口 3308。
+ - Port:调试端口(需要在下一步中设置)。
- use module classpath:项目根目录 shardingsphere。
编辑好上面的信息后,在 IDEA 中 Run -> Run -> e2e-debug 即可启动 IDEA 的远程 debug。
@@ -187,9 +187,9 @@ IDEA -> Run -> Edit Configurations -> Add New Configuration
-> Remote JVM Debug
可以通过如下方式 debug Testcontainer 启动的 Proxy 容器:
- 在 Testcontainer 的相关启动类后打一个断点,例如 sql 测试中 E2EIT#setUp() ->
`containerComposer.start();` 后面的一行打断点,此时相关容器一定已经启动。
- 通过快捷键 Alt + F8,进入断点调试模式,查看 containerComposer 下的 Proxy 对象 3308
映射的端口(Testcontainer
对外映射端口是随机的)。例如本次通过该表达式:`((ShardingSphereProxyClusterContainer)((java.util.LinkedList)((ITContainers)((ClusterContainerComposer)containerComposer).containers).dockerContainers).getLast()).getMappedPort(3308)`
获取到映射的对外随机端口为 51837。(或者通过命令 `docker ps` 查看)
- - 参考 `远程调试通过镜像启动的 Proxy` 中的方式,Port 设置为上一步中获取到的端口。
+ - 参考 `远程调试通过镜像启动的 Proxy` 中的方式,将 Remote JVM Debug 配置中的 Port 设置为上一步中获取到的端口,例如
51837。
-编辑好上面的信息后,在 IDEA 中 Run -> Run -> e2e-debug 即可启动 IDEA 的远程 debug。
+编辑好上面的信息后,在 IDEA 中 Run -> Run -> e2e-debug -> debug 即可启动 IDEA 的远程 debug。
#### 注意事项
diff --git a/docs/document/content/test-manual/integration-test/_index.en.md
b/docs/document/content/test-manual/integration-test/_index.en.md
index 81cf709d9d5..6c3a489d623 100644
--- a/docs/document/content/test-manual/integration-test/_index.en.md
+++ b/docs/document/content/test-manual/integration-test/_index.en.md
@@ -177,7 +177,7 @@ IDEA -> Run -> Edit Configurations -> Add New Configuration
-> Remote JVM Debug
Edit the corresponding information:
- Name: A descriptive name, such as e2e-debug.
- Host: A IP that can access docker, such as 127.0.0.1
- - Port: debugging port 3308.
+ - Port: debugging port(will set in next step).
- use module classpath: The root directory of the project shardingsphere.
After editing the above information, run Run -> Run -> e2e-debug in IDEA to
start the remote debug of IDEA.
@@ -187,9 +187,9 @@ After editing the above information, run Run -> Run ->
e2e-debug in IDEA to star
Debug Testcontainer started Proxy container by the following method:
- Set a breakpoint in the relevant startup class of Testcontainer, for
example, after the line `containerComposer.start();` in BaseE2EIT#setUp() in
the suite test, at this time, the relevant containers must have been started.
- Access breakpoint debugging mode through shortcut key Alt + F8, and view
the port mapped by the 3308 mapping of the Proxy object under the
containerComposer (the external mapping port of Testcontainer is random). For
example, the expression
`((ShardingSphereProxyClusterContainer)((java.util.LinkedList)((ITContainers)((ClusterContainerComposer)containerComposer).containers).dockerContainers).getLast()).getMappedPort(3308)`
get the mapped random port 51837.(or get mapped port by `docker ps`)
- - See the `Remote debug Proxy started by docker image` method, set the Name,
Host, Port, and use the port got in previous step.
+ - See the `Remote debug Proxy started by docker image` method, set the Name,
Host, Port, and use the port got in previous step, e.g. 51837.
-After editing the above information, run Run -> Run -> e2e-debug in IDEA to
start the remote debug of IDEA.
+After editing the above information, run Run -> Run -> e2e-debug -> debug in
IDEA to start the remote debug of IDEA.
#### Notice