I usually work until I am ready to flip my desk over. Then I ask Google. If that fails, I will ask the professor.
I think the key is to decide when the fighting is fruitful. In theory, you should never give up, keep working at it until it's done. That said, some things aren't worth the effort, and if not figuring it out holds you back from doing something more important, learning something new, then I wouldn't spend more than twenty minutes on it--especially if it's one of those obvious things, where the proof is just some factoring trick, or diagram chasing.
not all problems are created equal. sometimes, a problem gets inside your soul, and takes days of your life away. calculating the inverse of a 2x2 matrix should not be one of those problems.
it's hard to say, without more specific information, "which" problems are worth "more time". let's say you have 10 problems, and you have 4 hours of time to work on them (2 hours, over 2 days). in that situation, any problem that takes more than 24 minutes, skip it, and talk to the professor on the one day you possibly can. that's just efficient time-management.
problems which ask you to prove results you will use later, are in their own category. you literally can't spend "too much time" on these, because they're like a steeplechase you have to run to get to the understanding you need. but it's hard to say "which ones these are" (unless you can see into your own future). i think it's fair to ask someone (even if you have done little work so far), "which problems are the deepest/hardest", although be prepared to take the answers with a grain of salt, sometimes the right observation makes a "hard" problem easy, and sometimes a simple thing as a minus sign, can leave you stranded on a desert island.
I was stuck on a question and went to my profs office for help. She started doing the work and I started taking notes and she told me not to so that I would think for myself (btw am I obligated to comply). I sort of memorized how to solve the type of question but don't intuitively understand it. I had spent the morning google searching similar questions to no avail. I also wasn't sure if I didn't know what the question was asking or didn't know enough about the subject.
When I am stuck on a problem I try and work on it until I am out of ideas and out of patience. I then work on it for a little bit more. If it is still not solved I simply...go for a walk! By the time my walk is done the problem will often be solved (or I will have concocted a new approach).
If it is still not solved and I know where there is a solution (e.g. in a specific book or website) I will go there. Else, I will ask someone/a forum.
I do not like looking on Google, primarily because I have wasted so much of my time googling random question to which there is no answer or I am simply using the wrong words (some things have more than one word to describe them, with one of them being no-longer in use...but books written in the 60s still use the old term and don't tell you about the new term because it is too new!).
But yeah...go for a walk...
As an example, I often went to my steel design professor with assignment questions and I would explain what I didnt understand and he would ask me questions (to which I had to answer) in an attempt to show me what I needed to check and why (did I need to check lateral torsional buckling or no, why?, was deflection a problem, why?). He wouldn't give me the answer but he certainly helped me arrive at it by asking questions. I think this preserves the learning process, and helps the student.
A professor who runs through a solution without giving the student the opportunity to take notes, or ask questions is failing, in my opinion. No one benefits. Perhaps ask your professor if she could switch to the above.
I do think that students spend way too much time taking notes in class / office and not enough time thinking about what is going on. In this sense, taking notes distracts the student from the topic at hand. Plus, there is a definite line where things mentioned in class can be found in the book, on the web, from other classmates, etc... It makes in-class notes redundant up to this point. (Incidentally, I've spoken to many such people and they agree with these remarks. The strange part is that they haven't changed their habits.)
But, I agree. I don't take notes, I usually just listen because of exactly what you said--notes are watered down books....the important stuff is the stuff they don't write.