Pycharm Tutorial #2 - Debugging

Pycharm Tutorial #2 - Debugging

Tech With Tim

5 лет назад

374,355 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Jakub Mazur
Jakub Mazur - 25.07.2023 18:03

Code below ;)

import random

def generateRandom(upper):
r = random.randint(1, upper)
return r

def main():
run = True
num1 = generateRandom(10)
num2 = generateRandom(10)
result = num1 * num2
while run:
ans = input("What is " + str(num1) + " x " + str(num2) + "? ")
if ans.isdigit():
if int(ans) == result:
print('Correct')
run = False
else:
print('Incorrect solution')
else:
print("Input must be a numer")

if _name_ == '__main__':
main()

Ответить
Victor Durand K.
Victor Durand K. - 15.07.2023 10:25

Thank you very much !! Cheers ! 👋

Ответить
Роман Головко
Роман Головко - 04.07.2023 19:54

Дякую!

Ответить
Uracrom Toromag
Uracrom Toromag - 14.05.2023 04:25

Since you didn't leave the source code here there's no way to run in parallel and learn better (hands on). The explanations are good though.

Ответить
Deon O'Brien
Deon O'Brien - 11.02.2023 18:26

Thank you so much, thats going to save me a ton of time!

Ответить
peter woo
peter woo - 12.01.2023 04:39

very helpful. thank you!

Ответить
Anika & Amaya
Anika & Amaya - 11.11.2022 10:24

it helped me understanding the debug process easily. Its good and simple for newone into PC world. Thank you!

Ответить
Maciej Łuczyński
Maciej Łuczyński - 30.10.2022 10:20

Very good video. What kind of font do you use?

Ответить
nbvw3
nbvw3 - 26.10.2022 19:57

Thanks, this was helpful!

Ответить
Amal Johns
Amal Johns - 20.10.2022 17:55

kopp kop

Ответить
Brick bread
Brick bread - 09.10.2022 14:26

Finally, no more print statements for debugging

Ответить
Mohammad Parvini
Mohammad Parvini - 05.09.2022 14:52

In short:
Life saver!
Thanks for sharing this.

Ответить
Никита Цеханович
Никита Цеханович - 14.08.2022 14:57

Thanks for that!
But is there a way to debug the code by blocks like Jupyter Notebook? It would be great if Debugger allowed to go to previous step, and change something. Otherwise, one have to run the whole code again.

Ответить
Rohan Bangash
Rohan Bangash - 17.06.2022 03:24

THANK YOU

Ответить
Victor Dmytryk
Victor Dmytryk - 28.03.2022 23:15

Thanks man, it is helpful!

Ответить
Drygord Spellweaver
Drygord Spellweaver - 17.03.2022 07:07

Haha why didn't you use the debugger in your 12 hour coding livestream when you kept opening a socket?

Ответить
SunSon29
SunSon29 - 10.03.2022 20:34

pika pika

Ответить
💢S1Iiz💢
💢S1Iiz💢 - 06.03.2022 14:57

Yeah, but next time you need to zoom in or zoom out the screen while you are explaining or teaching someone, because it's too small while watching your video.

Ответить
John Soler
John Soler - 04.11.2021 20:34

There's this problem in my Pycharm where when I debug, it says "Variable are not available" even when I already have a breakpoint set on it. The weirdest part is that I am able to debug some functions, but for others, it just says that the variables are not available. I also don't know what difference decides whether the variables can be "available" or not. Can you please help me with this?

Ответить
Mel Ellington
Mel Ellington - 24.09.2021 03:32

Although I've used this kind of debugger since way back in the early 1980s with BASIC. However, not all programming languages have good debuggers (and some are overly complicated), if they have a debugger at all. Consequently, most of the time I simply either print debug statements to a console or send debugging text to custom text field.

Ответить
chas gaming tv
chas gaming tv - 29.08.2021 11:04

Is this windows 10

Ответить
The Chaos Artist
The Chaos Artist - 29.08.2021 10:43

Very helpful. I've been using PyCharm for a while but I hadn't taken the time to look at the debug tool.

Ответить
helloes
helloes - 27.06.2021 15:48

thanks for this!

Ответить
Sanjeeb Kumar Gouda
Sanjeeb Kumar Gouda - 10.06.2021 18:51

Amazing

Ответить
Kaivaly Daga
Kaivaly Daga - 10.05.2021 16:46

thank you for this

Ответить
Derek
Derek - 09.04.2021 21:15

great tutorial - thanks! 👍

Ответить
Agustín Pablo Russo
Agustín Pablo Russo - 23.03.2021 00:25

thks man

Ответить
Konstantin Burlachenko
Konstantin Burlachenko - 21.03.2021 17:46

Thanks for the video. There are several commands available in Python for Introspection:

dir() will give you the list of in-scope variables

globals() will give you a dictionary of global variables

locals() will give you a dictionary of local variables

Ответить
Yatırım Tavsiyesi Değildir
Yatırım Tavsiyesi Değildir - 17.03.2021 23:59

good job man keep it up

Ответить
FRAN7
FRAN7 - 18.02.2021 01:09

excellent tutorial, such useful topics (debugging) you mentioned. i had no idea that pycharm was so powerful at debugging.

Ответить
marghe
marghe - 11.02.2021 14:16

when I click on the debug tool it says "connection to python debugger failed, socket closed" and it doesn't let me run the debug. any way to solve that?

Ответить
Ankan Bera
Ankan Bera - 30.01.2021 18:54

What are the keyboard shortcuts for step into and step over etc. ?

Ответить
Sai Nitish Mitta
Sai Nitish Mitta - 25.12.2020 09:59

Increase font

Ответить
Moises Acero
Moises Acero - 15.12.2020 14:59

# Starting Code:
import random


def generate_random(upper):
"""

:param upper: >= 0
:return: int
"""

r = random.randint(1, upper)
return r


def main():

run = True
num1 = generate_random(10)
num2 = generate_random(10)
result = num1 * num2
while run:
ans = input('What is ' + str(num1) + ' x ' + str(num2) + '? ')

if ans.isdigit():
if int(ans) == result:
print('Correct')
run = False
else:
print('Incorrect! Try again!')

else:
print("Answer must be a positive number, try again.")


# global vars
times = 10

for x in range(times):
main()

Ответить
Sam Ozturk
Sam Ozturk - 09.12.2020 16:57

Are there any 3rd part of this Pycharm tutorial?

Ответить
miguel petrarca
miguel petrarca - 27.11.2020 05:52

how can you step into modules's source code written by others? I am using intelliJ and I have not figured out how via settings and google :(

Ответить
Yo Del
Yo Del - 03.11.2020 22:37

Thank you for explaining this stuff. I am new to this and currently in college for computer science and you are helping me tons. Can just one favor is to highlight your mouse points because the background is dark

Ответить
Admund Sothland
Admund Sothland - 27.10.2020 04:13

Tim, I simply cannot download pandas for Python 3.9. It gives environment error in my terminal. If you know the cause please let me know. Thanks. Awesome video, by the way.

Ответить
Aziel Solomon
Aziel Solomon - 20.10.2020 05:55

Great tool THANKS Tim you da best

Ответить
Tassos Kat
Tassos Kat - 12.10.2020 02:14

Very good tutorial Tim thank you

Ответить
seytanc4
seytanc4 - 05.10.2020 16:57

Thanks for this video!
One comment: before making a video please increase the font sizes so it would be readable in smaller screens: File>>Setting>>Font

Ответить
Winszy
Winszy - 25.09.2020 18:05

The voice is cringy😭

Ответить
Rievy Ren Celdran
Rievy Ren Celdran - 18.09.2020 04:42

hello sir i was wondering if you know that setting SecurePreTest in pycharm cuz im tryna prank my friend im tryna prank him by bruteforcing his fb and post clowns hehe please im not doing it for abd stuff e

Ответить
Momo
Momo - 04.09.2020 22:52

Here is his starting code:

import random


def generate_random(upper):
"""

:param upper: >= 0
:return: int
"""

r = random.randint(1, upper)
return r


def main():

run = True
num1 = generate_random(10)
num2 = generate_random(10)
result = num1 * num2
while run:
ans = input('What is ' + str(num1) + ' x ' + str(num2) + '? ')

if ans.isdigit():
if int(ans) == result:
print('Correct')
run = False
else:
print('Incorrect! Try again!')

else:
print("Answer must be a positive number, try again.")


# global vars
times = 10

for x in range(times):
main()

Ответить
Bronson M
Bronson M - 01.09.2020 13:38

hey, love your videos!

using PyCharm with python 3.8, not getting the comments appearing IN the code, next to the variables when the breakpoint is reached. Please help?

Ответить
Theo Phiri
Theo Phiri - 28.08.2020 22:10

So what’s more efficient, pycharm or python?

Ответить