What's the code for "print string" node in bp?

Most nodes you see are C++ function bindings, so search same name in API refrence:

In C++ you got whole log system in disposal:

I recommand you to use it as it places stuff in log file so in case of crash you can check what was happening. You can view log in runtime using Window->Devlopment Tools->Output Log or by starting UE4 application (this includes editor) with -log option in command line.

If you dont want to deal with setting up log categoories and such as writen in docs i gave, you can use this GLog->Log("bla bla bla"); quicker without those setups