Attitude is everything and is the hardest thing to learn. Skills are far easier to learn. That said, hopefully I can help.
I'll get into the issues you're facing generally, as well as your mindset and what's wrong there (might be quite a long answer.)
So, read this book: The mental game of poker. Ignore most of the poker references if you don't understand the game but the tl;dr is there is no tl;dr. This book, and the next one in the series, will help you understand your mindset and how to make gradual yet significant improvements in both the short and long term. These aren't books that you just read once.
In your case I would suggest you read the section on accumulative tilt. This occurs when someone feels down about not being able to do something, in your case fix a bug, but this increases over time due to ALL the bugs you haven't fixed so you begin to feel worse and worse. This isn't good. There are ways to fix that in the book by recognising yourself and your previous achievements as well as having a clear head in the when you hit bugs in the future.
With respect to the specific cases you gave, understanding how to fix bugs comes with experience as well as having a fundamental understanding of what you are doing. Since you never fix your own bugs you never learn, so you stagnate instead of constantly improve.
So instead of quitting and asking your friends to fix it for you, instead you need to read the error message, make sure you understand it, find out where in your code this issue originated from, understand and account for all variables/constants/dependencies that affect that origination point and then if that all makes sense either consult the documentation for that programming language you are using and/or paste the error (as general as possible) into a search engine to see if other people have had a similar issue.
Taking help from friends is nothing to be ashamed of, working together is a good thing.