One of the things that most often go wrong is that the Closure Compiler trashes your code at export with minify.
After this hard lesson you start writing everything with literals like MyExternalLib["activateAFunctionButMisplelled"] and it still will not work, but you don't notice that and spent some quality time debugging.
But there is a solution that is already used for C2 standard plugins and that is to use a externs.js file. So this is something I would like for 3pp plugins as well.
With that I can fully use both code completion and JSHint/JSLint type syntax checkers. If you are doing a large and complex plugin that is really an advantage.
I have gone from using Notepad++ to Brackets and now WebStorm and finally it's easy to write javascript again. WebStorm will index C2s all system files and give you code completion for everything. Well almost everything, the edittime.js needs special handling so I did a "library" for that here: https://www.frostyelk.se/development/edittimeLib.zip