Sometimes my print statements don't work

It sounds like perhaps you ran afoul of the effect that just typing new code in a function cell does nothing. If you call that function again, it just runs the old code. You have to actually click “Shift-Enter” on the modified function cell in order to get the new code “compiled” (well, interpreted really) into the runtime code image. Or clicking “Kernel → Restart and Clear Output” followed by “Cell → Run All”. Or by closing the notebook and reopening it, which kills the runtime image altogether and forces a restart.

You can easily demonstrate this to yourself. Add an obvious bug (or a print statement) to a working function and then just call it again. It still works or still doesn’t print, right? Now click “Shift-Enter” on the function cell and run the test again. Kaboom! :scream_cat:

BTW this was discussed on the DLS FAQ Thread. If you missed that, it’s worth reading through everything there.