运行Docker 容器 运行容器并暴露调试端口 5005: dockerrun-d-p5005:5005 hello-world-debug 1. 此命令将启动 Docker 容器,并在后台运行 Java 应用程序,同时将容器的端口 5005 映射到主机的 5005 端口。 配置IDE 进行远程调试 以IntelliJ IDEA 为例,设置远程调试: 点击Run>Edit Configurations... 点击+,选择Remote。
本地debug:idea本地启动——> idea 打断点 ——> postman 发送接口 ——> 进入断点 远程debug:服务器上启动——>idea 监听启动——> idea 打断点 ——>页面上操作发送接口——> 进入断点 应用场景 1例如我们部署的项目在线上出现问题了,而我们又不知道具体是哪里出现问题,我们就可以使用远程debug进行排查问题。
运行在 Docker 容器中的应用程序作为远程应用程序对待,因此可以将调试器附加其上。IntelliJ IDEA 包含用于远程调试的特殊运行/调试配置类型。 创建一个远程调试配置并为其添加一个特殊的启动前 (Before launch)任务:调试前启动 Docker (Launch Docker before debug),它定义了您希望运行和附加到的 Docker 配置。 现在,...
我们可以这样进行设置,使用鼠标右键单击桌面上的IntelliJ IDEA软件图标,选择“打开文件所在的位置”一栏镜...
使用Intellij 附加远程调试器 要附加调试器,转到右下角的运行部分并添加“Remote JVM Debug”运行配置。 可以看到,上面显示的命令行参数与我们在部署文件中指定为环境变量的值相同。 就是这样。现在可以运行配置并附加调试器。 使用VSCode 附加远程调试器
Create a remote debug configuration To attach the debugger to the running application, you need aremote debug configuration. Before starting, the remote debug configuration should first launch the Docker run configuration and start the application in debug mode. ...
本地连接远程服务器debug端口 打开Intellij IDEA,在顶部靠右的地方选择”Edit Configurations…”,进去之后点击+号,选择”Remote”,按照下图的只是填写红框内的内容,其中host为远程代码运行的机器的ip/hostname,port为上一步指定的debug_port,本例是5555 然后点击Apply,最后点击OK即可 ...
我们分解了Big Data Tools插件,允许单独使用其各个部分。 这让 IntelliJ IDEA 得到六个新插件:Kafka、Spark、Flink、Remote File Systems、Big Data File Viewer和Zeppelin。 如果你需要全部六个插件,仍然可以一键安装 Big Data Tools 插件。 IntelliJ IDEA 捆绑的 Android 插件现在提供 Android Studio Giraffe Beta 2...
apiVersion:apps/v1kind:Deploymentmetadata:name:application-deploymentspec:selector:matchLabels:app:applicationtemplate:metadata:labels:app:applicationspec:containers:-image:ghcr.io/amrutprabhu/remote-application:1.0.0-SNAPSHOTimagePullPolicy:Alwaysports:-name:httpcontainerPort:8080protocol:TCP-name:debug-port...
Idea Docker Java Debugger Plugin IntelliJ IDEA plugin that automates port configuration of Remote JVM Debug launch configuration so that you can debug a docker container without having to know the randomly what public port has been randomly selected by docker. Enable Toolbar Buttons Right-click on...