我正在尝试调试CDAP代码和插件代码
我尝试了几种方法来运行CDAP沙箱:
https://docs.cask.co/cdap/5.1.0-SNAPSHOT/en/developer-manual/getting-started/sandbox/docker.html
沙箱运行,stout日志显示端口5005用于调试
Starting CDAP Sandbox ...Listening for transport dt_socket at address: 5005docker ps还有另外两个端口: 0.0.0.0:11011->11011/tcp,0.0.0.0:11015->11015/tcp cdap-sandbox
当我将IntelliJ调试器配置为11015时,它似乎没有问题,但是断点不能捕获代码的运行。
我尝试在virtualbox上运行CDAP沙箱并使用192.168.99.100,但我仍然无法使用远程调试器捕获断点
我还尝试将5005添加到公开的docker端口0.0.0.0:5005->5005/tcp,并配置intellij来做同样的事情。Intellij无法连接到远程5005
如何使用intellij调试cdap沙箱?
发布于 2019-10-17 21:05:39
问题出在bin目录中的functions.sh文件。默认情况下,它将侦听端口绑定到localhost。
要修复它,请执行以下操作:
找到这一行:
"CDAP_SDK_OPTS+=" -agentlib:jdwp=transport=dt_socket,address=localhost:${__port},server=y,suspend=n"
并将其更改为类似(remove localhost:)的内容:
"CDAP_SDK_OPTS+=" -agentlib:jdwp=transport=dt_socket,address=${__port},server=y,suspend=n"
发布于 2018-11-01 00:41:14
发布于 2019-10-18 14:23:10
bin/cdap sandbox start --enable-debug在Run -> Edit Configurations -> Add New Configuration -> Remote
https://stackoverflow.com/questions/52993175
复制相似问题