12 As the documentation says, variables should be either _assigned_ locally or globally. However, `expl3` _declares_ all variables globally. I suspect the confusion arises as you are seeing `\<thing>_new:N` as an assignment, which while true at the underlying engine level is not what we mean in the documentation when we talk about the _programmer_ making an assignment.
9 It's almost always a bad idea not to provide a Minimal Working Example, so... you'll get what you deserve. :)
8 TeX has built in debugging means with the different `\tracing...` settings. You can specify with these to which level of detail you get information on what TeX is doing (different engines have extended these `\tracing...` macros beyond what Knuth originally built into TeX, but this answer is non-exhaustive in every way, instead I'll focus on what is interesting to see what a macro gets for arguments, and to what it expands).
7 The `unravel` package turns your TeX into a debugger in which you can step through macro expansions and assignments. It doesn't support all primitives though, for instance it can't be used to step through or over a `tabular` since the underlying `\halign` isn't supported, and using it across cell boundaries would most likely not work as well.
5 The following parses the input file name to see whether an extension was specified. If that extension is `.svg` `\includesvg` is used, else `\includegraphics`. If no extension was specified it is tried whether a file with the added extension `.svg` can be found, if that's the case `\includesvg` is used, else `\includegraphics`.
4 I basically solved this, with the help of the `\str_case:nnF` LaTeX3 function, which is a kind of replacement for the `switch`-statement familiar from other programming languages.