The single most useful tip is: check the
*debug* buffer. If anything goes wrong, there should be a message in there.
The second most useful tip is: anything a shell block writes to stderr gets logged to the
*debug* buffer. For example, if I run a command like:
echo about to excute "$cmd" 1>&2
evaluate-commands will run
:info hello, but the
*debug* buffer will contain:
shell stderr: <<<
about to excute info hello
The third most useful tip is decoding “stack traces”. Any plugin of reasonable complexity is likely to wind up with deeply nested evaluations - commands calling shell blocks that wind up invoking other commands, etc. and you’ll wind up with an error that looks like:
Error: 1:1: 'eval' 1:2: 'eval' no such command: 'blort'
The “1:2” bits mean line 1 column 2… of the block that they’re in. So the above message says that there was some evaluation that began (line 1 column 1) with an eval command. That first command starts a nested evaluation, and there was a second eval command at line 1 column 2 of the nested evaluation. That second eval command hit tried to call the non-existent “blort” command, but there’s no clue where that command occurred within the second eval command’s argument.