Debugging Fabric Chaincode -- Dev Mode and Unit Tests
In Fabric development, testing chaincode is a bit of a headache. First, in a real deployment, storage and queries in chaincode depend on the state database on the peer, so you cannot test it directly on your local machine. Second, chaincode runs inside a container, which makes it hard to get at the logs printed by your code.