I was just wondering if there are any books to learn how to analyze and debugging code of any programming language in general
Thanks in advance for the help
In general? Not that I'm aware of. Learn to use your IDE for source level debugging. The big secret is to avoid making the most common mistakes up front. To learn that I suggest googling "most common programming errors" and following the links.
A few big sources of bugs:
Books by Niklaus Wirth and Donald Knuth are good for this. Not cheap, but worth having on hand - they all have places of honor on my book shelf.
I have read some source code from many books. Saying, yeah, that seems obvious. Until you type them in, there will allways be some small errors sneaking in. So my advice: read books and practice, practice