Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a developer, I want to debug my chaincode #73

Open
siglesiasg opened this issue Jan 25, 2021 · 4 comments
Open

As a developer, I want to debug my chaincode #73

siglesiasg opened this issue Jan 25, 2021 · 4 comments

Comments

@siglesiasg
Copy link

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

@davidkel
Copy link

davidkel commented Jan 28, 2021

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.

@siglesiasg
Copy link
Author

siglesiasg commented Apr 15, 2021

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

@lasharela
Copy link

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

@FelipeSanchezCalzada
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants