iT邦幫忙

0

Debugging Tools & Tips

  • 分享至 

  • xImage

As a beginner, I often get stuck debugging my code. Anyone here using VSCode or PyCharm—can you share how you set breakpoints and inspect variables step-by-step?

I clicked next to the line number to create a red dot (breakpoint).
Then I pressed F5 to start debugging, and the code did stop where I expected.
I noticed there's a Variables panel, but sometimes it's empty or not updating — not sure if that means my breakpoint isn’t triggering correctly?
Also, hovering over variables works, but only during debugging. Is that normal?
: >
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
carsonleung
iT邦新手 4 級 ‧ 2025-06-23 20:54:35

I don't often use breakpoints, but I think it's normal for the Variables Panel to show non-updated or empty variables.

I suggest printing the variables to the console or using Colab to split the code into smaller parts for better monitoring of the variables(as you mention Pycharm I think you is programming in python).

Hope my advice can help you : >

/images/emoticon/emoticon28.gif

我要發表回答

立即登入回答