没有人遇到这样的问题。拥有一个Azure Functions应用(使用beta-2插件版本)。应用启动后,我收到一个错误,提示VSCode失败,无法删除调试对象VM。原因:连接被拒绝。
我安装了带有以下插件的VSCode:ms-azuretools.vscode-azurefunctions,vscjava.vscode-java-debug,vscjava.vscode-java-pack,vscjava.vscode-maven,redhat.java
launch.json包含以下配置:
`{
"name": "Attach to Java Functions",
"type": "java",
"request": "attach",
"hostName": "localhost",
"port": 5005,
"preLaunchTask": "runFunctionsHost"
}`
runFunctionsHost包含以下脚本:
mvn clean package -B; func host start --debug VSCode --script-root ....
OS:Windows
答案 0 :(得分:1)
解决方案是将“ JAVA_OPTS”参数添加到local.settings.json中,其值应类似于“ -Djava.net.preferIPv4Stack = true -Xdebug -Xrunjdwp:transport = dt_socket,server = y,suspend = n,地址= 127.0.0.1:5005“