No video

How To Debug Java Code The Right Way - Eclipse Debugger Full Tutorial

How To Debug Java Code The Right Way With The Eclipse Debugger
Full tutorial on using the Eclipse Debugger!
Do you still just use print statements everywhere to debug your Java code?
Many beginners don't know there's a MUCH better way to debug their Java programs, and it's built into Eclipse and every other modern IDE.
The Eclipse debug tools make debugging your Java programs incredibly simple and (dare I say it) even fun.
In this beginner's Java tutorial video, we'll do a full walkthrough of using the Eclipse Debugging tools.
Learn or improve your Java by watching it being coded live!
Hi, I'm John! I'm a Lead Java Software Engineer and I've been in the programming industry for more than a decade. I love sharing what I've learned over the years in a way that's understandable for all levels of Java learners.
Let me know what else you'd like to see!
Links to any stuff in this description are affiliate links, so if you buy a product through those links I may earn a small commission.
📕 THE best book to learn Java, Effective Java by Joshua Bloch
amzn.to/36AfdUu
📕 One of my favorite programming books, Clean Code by Robert Martin
amzn.to/3GTPVhf
🎧 Or get the audio version of Clean Code for FREE here with an Audible free trial
www.audibletria...
🖥️Standing desk brand I use for recording (get a code for $30 off through this link!)
bit.ly/3QPNGko
📹Phone I use for recording:
amzn.to/3HepYJu
🎙️Microphone I use (classy, I know):
amzn.to/3AYGdbz
Donate with PayPal (Thank you so much!)
www.paypal.com...
☕Complete Java course:
codingwithjohn...
codingwithjohn...

Пікірлер: 284

  • @ylananderson6291
    @ylananderson62912 жыл бұрын

    It's a shame that debugging isn't usually explained or taught in most courses even though it's one if not the best tool a developer has. It's a good thing that people like you make videos about this to let learners know about it. I want to share a little tip with everyone: you can use a conditional breakpoint to execute whatever piece of code you like, for example automatically edit a variable's value instead of doing it yourself everytime or log something with a print without even touching the code

  • @tibettenballs4962

    @tibettenballs4962

    2 жыл бұрын

    its a shame. JS HASSSS NO DEBUGGGERRRR

  • @ylananderson6291

    @ylananderson6291

    2 жыл бұрын

    @@tibettenballs4962 it kinda does, any browser should have the dev tools, you have to find your js file in the sources tab and do the debugging thing there. Otherwise for IDEs you can attach the process which is kinda like the first option but you do all the debugging from the ide window

  • @tibettenballs4962

    @tibettenballs4962

    2 жыл бұрын

    @@ylananderson6291 still sucks, no matter how you package it

  • @sairos4057

    @sairos4057

    2 жыл бұрын

    I hope someday I can do this, right now as a beginner I couldn't... :(

  • @_Anna_Nass_

    @_Anna_Nass_

    2 жыл бұрын

    I’m in my second year of computer science classes and they’re just now showing us how to use a debugger. They really should show us this stuff earlier. It would have been sooo helpful.

  • @Redcodes
    @Redcodes2 жыл бұрын

    I am coding in Java for 2 years and I always used print Statements to Debug. You just changed my entire life with that Video.

  • @davidx5828
    @davidx58282 жыл бұрын

    That’s so funny because I did put print statements throughout my code to figure it out 🤣🤣🤣

  • @CodingWithJohn

    @CodingWithJohn

    2 жыл бұрын

    You're not the only one!

  • @findlestick

    @findlestick

    2 жыл бұрын

    Same here, and I thought I was being so clever. 😑

  • @bagzhansadvakassov1093

    @bagzhansadvakassov1093

    2 жыл бұрын

    We all did

  • @MrSkinkarde

    @MrSkinkarde

    2 жыл бұрын

    The fastest way to debug for me still

  • @priyanandshukla8388

    @priyanandshukla8388

    Жыл бұрын

    I do the same even after watching this video 😂

  • @gunsmass93
    @gunsmass932 жыл бұрын

    At the moment as far as I looked at KZread, this is the only one Chanel where you can fully understand what he is talking about. Even if you are new to programing. Thank you verry much for the amazing content and your clean way to explain this amazing things to us! 😇😇😇

  • @abscodes9587
    @abscodes95872 жыл бұрын

    I honestly learnt a lot from this video John. I’ve spent nearly an hour and a half trying things with you and experimenting. PS I was one of the ones that throw print statements everywhere and it kinda gets messy most of the time hahah so thank you!

  • @josema294
    @josema2942 жыл бұрын

    Hi John, I've recently start studding coding, computers were my passions since ever, and now I've made the jump and pretend to quit from my job and do this for full time, also recently I've discovered your channel, is a huge pool of knowledge and inspiration for me, some topics are still out of my reach as a new student, but i can appreciate the value of this videos, soon some of them would become gold for me. So congratulations for your efforts, it,s something big, and just want to cheer you up!! i will keep having and eye on your videos even if still cant follow every topic. Thanks!!

  • @khurrambhatti9470
    @khurrambhatti947011 ай бұрын

    Thank you very much. I had been programming for over 7 years without using the debug mode. Even after all tge experience, I always learn something new from your videos.

  • @christyndall2009
    @christyndall20092 жыл бұрын

    Hey John, thanks a ton for your videos! I am currently an online student pursuing a bachelors in software development and your videos are better than the etexts they use at school. They really make learning Java much easier! I especially love this one and your videos on sorting, but I haven't made it through this series yet and can't wait too. Thanks again and please keep them coming!

  • @gladyslemus1798

    @gladyslemus1798

    11 ай бұрын

    I agree with you, watching his video made more sense than the live lecture 😅

  • @Hamza-qs7ez
    @Hamza-qs7ez3 ай бұрын

    You genuinely changed my life. I will save so much time, this feature is so rich, and the fact you can manipulate state and re-express and track those expressions... game changer... thank you

  • @shirotaku686
    @shirotaku6862 жыл бұрын

    Thanks for the tutorial. I knew most of it except for the conditional breakpoint. I used to help myself by creating dummy if-clauses to check for the condition. Very helpful, especially for beginners!

  • @tayyabmunir6228
    @tayyabmunir6228 Жыл бұрын

    I have more than 6 years of experience in java, but every time I watch your video, I learn new things :)

  • @mraymond5346
    @mraymond53462 жыл бұрын

    Hi John, as usual, well-explained and fun to watch. Thanks for taking the time to prepare and present the videos. Could you perhaps do one on streams... ? Thank you

  • @ritwikverma2463
    @ritwikverma24632 жыл бұрын

    Best Debugging Video available on KZread. I love the way you covered every scenario which can come in real life. Keep bringing the good content. ❤️

  • @MohitKhare
    @MohitKhare Жыл бұрын

    Someone give this man a medal. Thank you so much for this.

  • @neeve-gg7kz
    @neeve-gg7kz3 ай бұрын

    Thank you John. This is the first video i am watching to learn how to debug java code and i think i dont have any other video. It is that clear.

  • @rahuls331
    @rahuls331 Жыл бұрын

    Its been a week since I have been one of your videos on my lunch break. Learning something new everyday.

  • @rachidmah
    @rachidmah2 жыл бұрын

    Man, i was using prints all this time I learned a lot from this video, thank you very much

  • @douglasheller1863
    @douglasheller1863 Жыл бұрын

    Great explanation on how to debug. I've needed this for quite a while. Many thanks.

  • @douglasheller1863

    @douglasheller1863

    Жыл бұрын

    A good teacher is hard to find. Esp in tech.

  • @freeSpiritNonna
    @freeSpiritNonna5 ай бұрын

    I am new to Java, but quite good at a few other programming languages. I've been so lazy to learn the conditional breakpoint that I've modified my source codes instead to create the condition. Now that you showed it in such a quick step, I feel quite dumb :-). Thanks for the helpful video!

  • @clarajosephine3295
    @clarajosephine329510 ай бұрын

    How did i not know that this thing exists.... this makes my life sooo much easier, thank you

  • @illiazo
    @illiazo2 жыл бұрын

    The fact that I watch your videos just for entertainment and to learn even though I'm not working on a specific task, makes you no less than a great content creator! please keep it up!

  • @Dr.Ecksack
    @Dr.Ecksack2 жыл бұрын

    Awesome! Really compact video for understanding the basics. I am working with intelliJ and always got confused with tutorials on debug mode. Thanks!

  • @Dr.Ecksack

    @Dr.Ecksack

    2 жыл бұрын

    A tutorial like this on refactoring would be nice, too 🙂

  • @shankar7435
    @shankar7435 Жыл бұрын

    A new thing I learned from here is the conditional break point. Awesome video. Thanks to John.

  • @Tuxon24rus
    @Tuxon24rus2 жыл бұрын

    Thank you so much, John! You're incredible! I've never had such experience back in my school and University days. You make learning easy and fun ^^ P.S. We're missing the bloopers in the end, please bring them back! :3

  • @socaljusticewarrior558
    @socaljusticewarrior5582 жыл бұрын

    I made an incredibly large text based game a year ago, and I gave up on it because I got an error that I didn't understand. Stack Overflow didn't help me much either. Now I will go back and debug it with the tips you have given me here.

  • @CodingWithJohn

    @CodingWithJohn

    2 жыл бұрын

    If you get an error you can't figure out again, post the code as a comment and see if I or someone here can help out!

  • @danielcommins1285
    @danielcommins12852 жыл бұрын

    One more thing to add is the option to view static variables in the variables tab. By default it's not enabled so you have to enable it. Otherwise you'll wonder where your static variables are!

  • @nsanzabandifiacre1042
    @nsanzabandifiacre10422 жыл бұрын

    Thank you so much. I have been working as a Java developer for 8 years but I learnt a lot in this tutorial.

  • @kanrup5199
    @kanrup5199 Жыл бұрын

    debugging by eye and prints can break a new inexperienced programmer, or at least hinder. this kind of debugging tool is so much help.

  • @VaibhavJain
    @VaibhavJain Жыл бұрын

    One of the most informative, specific and thoughtful video on debugging in Eclipse, thanks a ton John. Keep up the great work.

  • @lookupverazhou8599
    @lookupverazhou8599 Жыл бұрын

    Literally just opened up a whole new world for me.

  • @nathanlucas9510
    @nathanlucas95102 жыл бұрын

    For a while i've been guilty of using the sysout method because i found the debug tool a bit confusing, but this has upped my game. thanks!

  • @AJ3000_
    @AJ3000_2 жыл бұрын

    This man has taught me more java than my school has in 3 semesters

  • @LTEVideoTutorials
    @LTEVideoTutorials2 жыл бұрын

    It is the best video on this topic on KZread. Thanks for your efforts!!

  • @CodingWithJohn

    @CodingWithJohn

    Жыл бұрын

    Thanks! It looks like you also used to make tutorials here on KZread (that got TONS of views by the way!) but haven't for a few years. I'm curious, is there a reason you stopped?

  • @LTEVideoTutorials

    @LTEVideoTutorials

    Жыл бұрын

    @@CodingWithJohn Thanks for reply. Yes, I made videos on 4G. But now changed my domain to full stack developer so learning few basics 😀

  • @anasseelhazime2980
    @anasseelhazime29802 жыл бұрын

    Hi John, I am a beginner in java and I want to thank you for those videos, they are so helpful. I did learn a lot so from you. cheers.

  • @CodingWithJohn

    @CodingWithJohn

    2 жыл бұрын

    Awesome, I'm glad the videos help! Thanks for watching!

  • @antonslyzhko4926
    @antonslyzhko49262 жыл бұрын

    Perfect! Now I can save so much time debugging my programs. Thank you!

  • @JTBanks
    @JTBanks2 жыл бұрын

    Really great job with this video!! I can't explain how life changing some of this information is. I was wondering John, at some point in the future would you be willing to do code reviews occasionally? It could help with content, and personally I find myself at a standstill currently in my coding life. My friends and co-workers say my code is good, but I'd really appreciate an unbiased opinion. But, regardless, amazing job, thank you so much!

  • @CodingWithJohn

    @CodingWithJohn

    2 жыл бұрын

    That's a very interesting idea! I can't guarantee anything, but if you would be willing to potentially have your code shared in a video, you can either leave your code here in the chat or email it to me (john@codingwithjohn.com), and I'll see if a code review for it might make a good format for a video that would be informative to others.

  • @jphahom
    @jphahom Жыл бұрын

    This is remarkably well explained, and truly enjoyable. The best among all technical videos I've watched.

  • @UmaVatsan
    @UmaVatsanАй бұрын

    Your explanation is clear and neat ! THANKS 🙏

  • @EchoENKO
    @EchoENKO Жыл бұрын

    Wow.... I came here to learn some simple breakdown of debugging. Now, I feel capable of debugging. 😎

  • @viktru
    @viktru2 жыл бұрын

    John, your videos are probably the most helpful ones I came across. Thank you!

  • @socaljusticewarrior558
    @socaljusticewarrior5582 жыл бұрын

    This is also good for looking at Java's built-in classes and methods.

  • @jvsnyc
    @jvsnyc2 жыл бұрын

    Quite excellent. While watching I had some "Yeah, but" or "but what about?" moments and I can say that by the end of the video you quite literally covered all of them. Many larger places with more legacy code might have painted themselves into a corner with Eclipse dependencies. I am going to very soon find out for my next/current work environment, but I've worked at least two places where you pretty much were forced to use Eclipse for various reasons, grumbling about how your favorite IDE was better and more productive was optional.

  • @CodingWithJohn

    @CodingWithJohn

    2 жыл бұрын

    Yep, the comment I've received the most here was, "Why not IntelliJ?" Although I mainly use IntelliJ, I had assumed most newer learners tended to use Eclipse, but that may not be the case anymore. So I'm planning to do a subscriber poll soon to try and get an idea of the most used IDE, and might end up making a switch for future videos.

  • @mayankpant1596

    @mayankpant1596

    2 жыл бұрын

    @@CodingWithJohn ..from the first year in university we were told to use intellij because it's more commonly used in the industry nowadays. But here in KZread most of the guys I have seen use eclipse so I don't really know how true is that.. Tbh it really doesn't matter cause they have mostly the same functionality imo..

  • @mukeshjangid1090
    @mukeshjangid10902 жыл бұрын

    Nice video, I was already aware about it except the conditional breakpoint, it will be going to help me a lot. Thanks John ☺️

  • @FelipeSantos-zh8ue
    @FelipeSantos-zh8ue7 ай бұрын

    Great tips to code like a pro. Debugging make it way easy. Like everyone said: Thanks a ton

  • @buraxta_
    @buraxta_2 жыл бұрын

    I got so many things thanks to your video, I'm so grateful 🙏

  • @manojpal8337
    @manojpal83372 жыл бұрын

    Conditional Breakpoint was new for me .Thanks

  • @francksgenlecroyant
    @francksgenlecroyant2 жыл бұрын

    This channel is a gold to me, John Rocks!

  • @fjhiuenjey
    @fjhiuenjey2 жыл бұрын

    These tips are very useful!! I didn't know about the conditional breakpoints. Nice video!

  • @dmitricherleto8234
    @dmitricherleto82342 жыл бұрын

    Thank god I found this video, this is extremely helpful. Thank you so much John, I love all of your videos :)

  • @othmaneerrarhbi3466
    @othmaneerrarhbi34662 жыл бұрын

    Very lovely & useful tutorial ! It covers all the functionalities we need even when debugging very large projects with thousand of dependencies. Thanks a lot !

  • @panchanansahoo1463
    @panchanansahoo14632 жыл бұрын

    That was one hell of a video.Awesome man

  • @mdawadud3520
    @mdawadud3520 Жыл бұрын

    Very clear to me. Thank you so much 👍. Please keep up your good work.

  • @anirudha3464
    @anirudha34642 жыл бұрын

    I never eclipse IDE has these features , thank you for the clear and crisp explanation , can you do a video on how to setup eclipse IDE (best practices), TIA

  • @tonyregalado7281
    @tonyregalado72812 жыл бұрын

    Thanks, John! You're a fantastic teacher my friend.

  • @bachirahmed5986
    @bachirahmed59862 жыл бұрын

    Incredible video thanks a lot ! I wish my profs in university were half as clear and helpful as you are ! I learned a lot 🙏🏽

  • @NobleAbsinthe
    @NobleAbsinthe Жыл бұрын

    My professor at UAlbany Michael Phipps made this video required viewing. You sir are now homework.

  • @COD_MW007
    @COD_MW0072 жыл бұрын

    I just want to say thank you because your videos really helped me alot and i always enjoy watching them, and wish you all the best and great success you achieve this year and ahead. ❤️🙏🙏

  • @yashibhardwaj6871
    @yashibhardwaj6871 Жыл бұрын

    You have explained in depth and I really enjoyed your video. Very well presented and informative.

  • @blackcoffeedevelopment3522
    @blackcoffeedevelopment35222 жыл бұрын

    You sir have your self a new sub! Thanks for the awesome tutorial. To the point, clear, easy to follow. 10/5 stars

  • @bobipppp
    @bobipppp2 жыл бұрын

    Really helpful explanation for the debugging process. Thanks John!

  • @sathya8242
    @sathya82425 ай бұрын

    Thanks a ton John!!. this tutorial is amazing!

  • @dougeighteenfifty980
    @dougeighteenfifty9802 жыл бұрын

    John, I think a good future video could be showing us how to use Java Streams!

  • @piyushlovanshi8142
    @piyushlovanshi81422 жыл бұрын

    You are a godsent, perfect timing.

  • @Sauce-ke
    @Sauce-ke2 жыл бұрын

    Best explanation ever as usual. Please make a Java Data Structure videos as well. I really need it

  • @gnsc
    @gnsc2 жыл бұрын

    Can you pls do videos on Java 1.8 concepts like lambda exp , streams, and also threads. pls John.

  • @Yumikoo
    @Yumikoo2 жыл бұрын

    I'm waiting for the next video, great job buddy, you explain very well and it's very easy to understand

  • @arshitrastogi2036
    @arshitrastogi20362 жыл бұрын

    Hey John ! Thank you very much for making a video on such an underrated topic. Just a request, can you make detailed videos on java file system and multithreading.

  • @saltpie5176
    @saltpie51762 жыл бұрын

    thx for high quality video lecture john!

  • @aidoka2000
    @aidoka2000 Жыл бұрын

    Thanks John, for another amazing video tutorial. Kudos to you for being such a great teacher. You do one of the best java explanations.

  • @KonyaK95
    @KonyaK952 жыл бұрын

    The conditional one was very helpful, but I have another question: how do you find the exact iteration where the error occurs (without print statement)? There were multiple cases when I had a problem with the code between 400-600 iterations, but I did not know the exact iteration of the bug. With print, it was easy

  • @rohitdarekar6367
    @rohitdarekar63672 жыл бұрын

    Thanks John for sharing this type of information. very usefull.

  • @LordPunckyii
    @LordPunckyii Жыл бұрын

    Pure gold info, thank you John

  • @hashcodehub6717
    @hashcodehub67172 жыл бұрын

    best video ever on whole internet MAN :)

  • @allenminch2253
    @allenminch2253 Жыл бұрын

    Thank you so much, such an extremely helpful explanation of the Eclipse debugger!

  • @mrayoubamrani
    @mrayoubamrani8 ай бұрын

    Thank you for this crash course

  • @ke30_
    @ke30_2 жыл бұрын

    Eclipse in light mode, my eyes are burning but your tutorials are too good

  • @CodingWithJohn

    @CodingWithJohn

    2 жыл бұрын

    Most of my videos use a dark theme, but for some videos that are specifically about IDE features I tend to use the default theme so it's more easily followable for beginners. But yeah I should have had my sunglasses on while recording.

  • @volodymyrholiev1187
    @volodymyrholiev11872 жыл бұрын

    John, thanks for this awesome video. The best explanation of debugging. Really helpful 👍

  • @prenomnom9881
    @prenomnom98812 жыл бұрын

    I am waiting for the Streams and lambda course to susbcribe to your private course. Thank you for your effort and for sharing with us, your valuable knowledge. Peace out ✌️👍👍

  • @xuananhofficial7879
    @xuananhofficial78792 жыл бұрын

    I come from Vietnam. Your video is very interesting

  • @sohott
    @sohott2 жыл бұрын

    That's so cool, I'm going to try to implement that in my routine. Thank you, John!

  • @Lixon236
    @Lixon2362 жыл бұрын

    Why not Intellij IDEA?

  • @NiteshBhushan95
    @NiteshBhushan952 жыл бұрын

    Hi John , Thanks for such a Tutorial .. It really helps in our day to day coding life .. Looking forward to get session of Time and space complexity .. Please take this up in your upcoming video

  • @mukailasalami7128
    @mukailasalami71289 ай бұрын

    Short and sweet. Weldone

  • @flaviuvanca9289
    @flaviuvanca92892 жыл бұрын

    Brilliant Tutorial John, by the way I have similar glasses :))

  • @M1a2n3o43
    @M1a2n3o432 жыл бұрын

    Hey John your videos about Java are the best. I have learned from you in these videos more than my teacher 😂. The only thing i havent yet understood is static vs nonstatic 😅. Can you do a video about it please. Either way thank you for your work.

  • @CodingWithJohn

    @CodingWithJohn

    2 жыл бұрын

    Thanks! Static vs nonstatic was a big point of confusion when I was learning as well. I do have a video about it in the course, but might eventually have one on KZread as well. We'll see!

  • @emanuelcomes3086
    @emanuelcomes30862 жыл бұрын

    Hi John, we are waiting for the video of this week :)

  • @CodingWithJohn

    @CodingWithJohn

    2 жыл бұрын

    I'm working on editing now. If all goes well, it will either be Monday or Tuesday morning.

  • @mafakka2
    @mafakka22 жыл бұрын

    hey John, let's do lambdas and streams API! in any order you prefer :)

  • @QuadeSan
    @QuadeSan2 жыл бұрын

    Man, you are incredible 10/10

  • @isotoxin
    @isotoxin2 жыл бұрын

    From the likes count, it looks like people prefer the "print statement" debug style. :D

  • @kobaabzianidze4677
    @kobaabzianidze46772 жыл бұрын

    Every video is just a briliant, Mr John can you shoot video about Java memory management? how objects are created and located in stack(references) and in heap, that will be very useful to fully understand how java works. thanks again for great videos

  • @arashaadd
    @arashaadd2 жыл бұрын

    Thank you great sir, your teaching has been the best for the quickest learning

  • @lmaoboxuser
    @lmaoboxuser2 жыл бұрын

    what about the runtime code edit?

  • @user-oz5ju2mu8j
    @user-oz5ju2mu8j10 ай бұрын

    thank you so much! you make learning very easy

  • @raulterraferrao696
    @raulterraferrao6962 жыл бұрын

    Thank you! You are the best! Helped me a lot

  • @jiauke
    @jiauke2 жыл бұрын

    Thank you very much John, you're always the solutions to my problems

  • @gsam3
    @gsam32 жыл бұрын

    Thanks alot. Finally i understand it much better

  • @amineabderrahmane3875
    @amineabderrahmane38752 жыл бұрын

    I appreciate the explanation. Thank you very much

  • @alexei3366
    @alexei33662 жыл бұрын

    Conditional breakpoint is cool

  • @andreiaquino8994
    @andreiaquino8994 Жыл бұрын

    Thank you! I needed this very clear explanations I've read the explanations from the internet, but this is better. Subscribed.

  • @enigma7453
    @enigma74532 жыл бұрын

    Great tutorial, thanks a lot!