Lasharela
Lasharela

Reputation: 1547

How to debug Chaincode with IBM blockchain platform

I'm trying to debug a simple codechain that is created by default by the IBM blockchain platform plugin for VS Code.

Looks like I'm doing everything correctly but breakpoints are not working.

Steps to reproduce:

  1. Open .ts file and set brake points
  2. archive, deploy and instantiate code chain (BTW, based on the documentation you don't need to do this but, If I'm not doing this, I'm not getting a list of code chain methods on the next step)
  3. Run debugger, choose "pickup brakepoints" enter image description here
  4. in this step I see red light. (Looks like it's ok so far)
  5. click blockchain icon, "Submit Transaction" > select method > enter > enter (I don't need any arguments to execute this method)

Transaction successfully submitted. Brake points are not working. What I'm missing or doing wrong?

enter image description here

OS: MacOS Language: TypeScript IBM plugin version: 2.0.1 Docker image ibmcom/ibp-microfab:0.0.8

Hmm... is it just a bug?

P.S. If I'll choose "Manual" (Run until manually stopped) I guess I have to have "debugger" in my chain code right? anyway it's not working.

Any help?

Upvotes: 1

Views: 424

Answers (1)

Ashwath Govindan
Ashwath Govindan

Reputation: 11

Please check out the Hyperledger Fabric Debugger which supports both Go and Node.js chaincode debugging at this time.

Upvotes: 1

Related Questions