Это видео недоступно.
Сожалеем об этом.
python debugger crash course: pdb / breakpoint (beginner - intermediate) anthony explains
HTML-код
- Опубликовано: 18 сен 2020
- today I go over the python debugger (pdb) and the most common commands I use!
- postmortem debugging: • postmortem debugging i...
playlist: • anthony explains
==========
twitch: / anthonywritescode
dicsord: / discord
twitter: / codewithanthony
github: github.com/aso...
stream github: github.com/ant...
I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
Damn, this saved my ass today.
Had to run code line by line and check lots of variables throughout to figure out what was going wrong with a script. As I could only access the machine via terminal in an SSH session, I couldn't use VSCode's debugger.
Thank you so much, bro!
Love your work, you have helped me a lot. Thank you mate.
Love that you were debugging the module you were trying to run. Good example of what happens when debug statements make it in to the code. Which is exactly what pre-commit is meant to prevent. Ahhhhhhhhhh
lol yep, big oops there :) but a good result in the end!
@@anthonywritescode basically brought this video full circle.
Nice video. I didn't know about `return`! Interesting that you find these more useful than conditional breakpoints, that is probably my most used feature. I guess this shows there are many different ways to approach debugging :) Like you, I have never managed to make tab completion work in pdb, I often drop down to full python with interact, but even that is sometimes hit or miss (when it comes to tab completion). Looking forward to the follow-up video on debuggers :)
conditional breakpoints are useful, but so so hard to explain (and usually I just do `if ...: breakpoint()` anyway). I used to have pdb tab complete working, but apparently I thought it was enabled by default in python3+ and deleted it!: github.com/asottile/scratch/commit/d713d95b2aa9af9f40db646788f65db75b7d4ee5#diff-2f794ea6c237446e15b2a2d127706060
@@anthonywritescode thanks for pointing to your pdbrc :)
outstanding video anthonywritescode. I killed the thumbs up on your video. Keep up the superior work.
13:20 thats dope, pre commit saves the day once more
it was helpful for me, thanks
Hey I want to learn how to code python. What do you recommend I do to start? I was thinking about just watching videos here on youtube. I took a cs 102 class which is for beginners in college but it was too fast pace for me as I knew nothing about coding previous to the course and I feel I did not learn from it because like I mentioned it was too fast paced for me and all I did was use chat gpt so I can keep up with assignments.
Useful, saved me many times, thanks for sharing!
Do you plan to make a more advanced debugging video, for example with threads and/or multiprocess library in use and how to debug it from CLI?
debugging threading / multiprocessing isn't easy at all! I've not found a good way to do it personally
@@anthonywritescode Yeah, for me, it's also difficult to tackle. Right now I'm trying to solve it with some success using debugger in an IDE of my choice and works fairly well so far. If I need to debug for example why the thread responsible for sending data to the device under test didn't get proper TCP/IP data. Unfortunately, it's extra hard to do so when you don't have source code for this module because it's compiled using Cython AND you do so on windows.
Does it make sense to use PDB or PUDB if your using VSC? Thanks for video!
it depends -- if you can get vs code's debugger working and you're more comfortable using that then by all means go with that route! I still think it's useful to know how to use a terminal debugger and terminal editor for situations where you won't have an IDE available -- but for primary daily-driving debugging an IDE is just fine!
Thank you so much, bro
How do you debug a if statement in general. Also how do you debug a if statement in vs code? I want to see the results of the conditionals tests.
I would either make a conditional breakpoint, or evaluate the condition, or step through it
Very good explanation, thank you. And so easy! Why don't more people use this?
Well that was cool. I usually use iPython, cuz it's pretty.
How do i debug my life
Next up.. decorators, please?
lucky you! I already made a video about decorators: ruclips.net/video/WDMr6WolKUM/видео.html
@@anthonywritescode Silly me 😂. I did a RUclips search the other day in your channel, but somehow, this did not come up.
Thank you!