Best way to develop and hack on modules is the ./hacking/test-module script in the checkout. It can run a module and if you print things it will still give you output.
You can either use print based debugging (and remove them later) or even can insert debuggers.
Here's some info on how I sometimes do it when I want to get into a debugger:
Though most of the time, I use print and ./hacking/test-module too.
If the argument to "-a" starts with @, like "-a @args.json", you can use a JSON file, which may be neccessary in passing structured data that many of the cloud modules can require.