Although NSIS allows you to build quite powerful installers, the "so low level language that it reminds me of assembly" that NSIS uses is quite prone to making mistakes and therefore, when you want your installer to do something more complex other than writing files, debugging is a must.
Until now I've used the following Dr Printf-like debugging technique:
- In a
.nsh
file that I include everywhere, I define aNSIS_DEBUG_MSG
macro according to the value of aDEBUG
define- if
DEBUG
is on, the macro will trigger a MessageBox with the debug message - if
DEBUG
is off, the macro will do nothing
- if
This method has served me well but it presents some disadvantages:
- it requires me to fill the code that I feel it's the one failing with calls to
NSIS_DEBUG_MSG
and rebuild the installer several times until I get enough info to allow me to solve the problem - it will do me no good if my problem is that the installer itself fails (if the installer program dies)
So what I wanted to know is what debugging methods do you use for these installers so that hopefully I can improve mine.