Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Debugger
#1
I am using PyCharm to run my Python code.

When I place a breakpoint on a line, the whole code runs through to the end? What can I be doing wrong. Note, I am a newbie.
Reply
#2
Are you running in debug mode? If so, maybe your code is not reaching the breakpoint.
Reply
#3
I'm running it on Run mode. The breakpoint is on line 7.

import openpyxl
from openpyxl import load_workbook

folder = 'D:/Power BI & Python/'
file = 'Test_Data.xlsx'

wb = openpyxl.load_workbook(folder + file)
wss = wb.sheetnames
ws = wss[0]
wsmaxRow = wb[ws].max_row

print(ws)
print(wsmaxRow)
Reply
#4
Breakpoints don't work in run mode. You need to run it in debug mode.
Reply
#5
When I select the Debug tab at the bottom, it automatically jumps to the Run tab!
Reply
#6
Read this:

https://www.jetbrains.com/help/pycharm/p...er-session
Reply
#7
Thanks will repost if I still have an issue.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Idle debugger pops up Run.py - library? fred1232 1 1,640 Jul-27-2021, 01:01 AM
Last Post: Larz60+
  VS Code debugger using wrong Python environment topfox 0 2,497 Jun-09-2021, 10:01 AM
Last Post: topfox
  Using Spyder Full Screen Debugger ErnestTBass 0 1,470 Aug-20-2020, 08:17 PM
Last Post: ErnestTBass
  Debugger Disabled erictan 1 3,980 Apr-30-2020, 02:17 PM
Last Post: pyzyx3qwerty
  pydev debugger: process 3442 is connecting when I run a program with ALT+COMMAND+R Seneca260 1 2,640 Jan-06-2020, 06:57 PM
Last Post: micseydel
  Python Debugger Suggestions nilamo 3 3,059 Oct-22-2018, 07:05 PM
Last Post: jdjeffers
  Visual studio debugger- "Frame not in module" Yaya33 2 6,311 Nov-12-2017, 08:02 PM
Last Post: Yaya33
  Debugger Font Size pythonck 3 4,149 Jul-18-2017, 05:58 PM
Last Post: snippsat
  Recommendation for Python IDE (with debugger, Windows platform) vadim_datascience 6 6,056 May-21-2017, 06:42 PM
Last Post: Larz60+
  Saving data in the Debugger macellan85 1 2,876 Apr-27-2017, 09:51 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020