背景
开发Fabric链码对于开发者而言步骤繁琐:需要部署节点、安装链码、重启网络等操作。当前VSCode中的插件“Hyperledger Fabric Debugger”可以帮助我们迅速开发智能合约。
使用步骤
-  安装插件 
 在VSCode中安装Hyperledger Fabric Debugger插件
  
-  打开要开发链码的目录,创建.vscode/launch.json 文件,内容如下: 
{
    "configurations": [  
        {
            "name": "Debug Chaincode",
            "type": "hlf-go",
            "request": "launch",
            "isCaas": false
        }
        
    ]
}
-  编写合约 
-  创建test.fabric文件,内容如下: 
[      
    { 
        "query": "ReadAsset",
        "args": ["asset1"]   
    },
    {
        "invoke": "CreateAsset",
        "args": ["asset1","blue","71","Tom","220"]
    }
]
- 开启调试,按下F5按键,在test.fabric文件中点击send request即可调试链码
  













![[JAVAee]SpringBoot-AOP](https://img-blog.csdnimg.cn/90425924543a410786d19347fcb5ae6c.png)





