写在代码里
System.setPropety("javax.net.debug","all")
value值可以设置all、true、ssl
具体可以参考这里:https://www.ibm.com/docs/en/sdk-java-technology/7.1?topic=troubleshooting-debugging-utilities
写在启动配置中
在VSCode 的launch.json中增加vmArgs参数即可
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach)",
"hostName": "localhost",
"port": 1044,
"timeout": 30000,
"vmArgs":"-Djavax.net.debug=all"
}
]
}
具体可以参考:https://github.com/microsoft/vscode-java-debug/blob/main/Configuration.md