microfab icon indicating copy to clipboard operation
microfab copied to clipboard

As a developer, I want to debug my chaincode

Open siglesiasg opened this issue 4 years ago • 4 comments

Hello,

I was trying to debug my chaincode but I'm no able to do it with the default VSCode configuration and latest plugin extension (2.0.0):

"version": "0.2.0", "configurations": [ { "type": "fabric:node", "request": "launch", "name": "Debug Smart Contract", "preLaunchTask": "tsc: build - tsconfig.json", "outFiles": [ "${workspaceFolder}/dist/**/*.js" ] } ] }

peer complains with following message:

[ org1peer] 2021-01-25 08:02:05.741 UTC [chaincode] notifyRegistry -> ERRO 17d failed to start bkchain-contract:0.0.4 -- peer will not accept external chaincode connection bkchain-contract:0.0.4 (except in dev mode)

How do I configure the blockchain in dev mode?

Thanks

siglesiasg avatar Jan 25 '21 08:01 siglesiasg

Probably would have been better to raise the issue here https://github.com/IBM-Blockchain/blockchain-vscode-extension, but the problem is partly a fabric one. fabric 2.2 doesn't support dev mode (which it did in V1) and that is how vscode would set up a debug environment. So currently it's not possible to debug.

davidkel avatar Jan 28 '21 08:01 davidkel

I don't understand why you've said that fabric does not support dev mode. In this link someone is doing it https://www.programmersought.com/article/57265367123/ and I've changed by myself microfab to allow dev-mode and it works ... image Could you explain why Fabric 2.2 does not support dev mode @davidkel? Thanks

siglesiasg avatar Apr 15 '21 07:04 siglesiasg

Debug mode is one of the biggest problems of Microfab and IBM blockchain VSC plugins. But why they are not solving this is interesting.

lasharela avatar Jul 12 '21 05:07 lasharela

I have been waiting for this functionality in the VS Code extension for more than a year and there is no news. It seems that the IBM team has no interest in supporting debugging. Don't expect this feature to come here or in the extension, unfortunately.

FelipeSanchezCalzada avatar Feb 24 '22 22:02 FelipeSanchezCalzada