S
S
shibanovan2017-08-11 10:32:45
Python
shibanovan, 2017-08-11 10:32:45

How to debug handlers in Pycharm?

Good Friday everyone! Friends, I am training with writing a bot (I took the telebot library) I found a simple example where there is such a code:

@bot.message_handler(content_types=['photo'])
def handle_docs_photo(message):
    try:

        file_info = bot.get_file(message.photo[len(message.photo) - 1].file_id)
        downloaded_file = bot.download_file(file_info.file_path)

        src = 'D:\\temp\\test\\' + (file_info.file_path).replace('/', '\\')
        with open(src, 'wb') as new_file:
            new_file.write(downloaded_file)
        bot.reply_to(message, "Фото добавлено")

    except Exception as e:
        bot.reply_to(message, e)

And that's where I put breakpoint in pycharm, when I start debugging, it doesn't stop. And without this, it’s hard somehow ... tell me how to stop in such cases?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shibanovan, 2017-08-11
@shibanovan


javedimka @javedimka right-
click on the circle and see that All is checked so that all threads stop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question