Files
openide/python/testData/debug/test_add_breakpoint_after_run.py
Egor Eliseev b0995cd9a1 PY-72345 Pycharm 2024.1 Broken debug on Python 3.12-3.13
Add a processing function for new breakpoints.


Merge-request: IJ-MR-152628
Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com>

(cherry picked from commit 63ebb4c7c620cf7cc3f56924619fc5adc09e25dd)

IJ-MR-152628

GitOrigin-RevId: 1f26240498360aff61ff27878118b0eb841ec082
2025-01-16 16:20:50 +00:00

27 lines
765 B
Python

import time
def calculate_sum(a, b):
# Use a breakpoint here to inspect the program flow
result = a + b
return result
def greet(name):
# Use a breakpoint here to debug the call
print(f"Hello, {name}!")
if __name__ == "__main__":
counter = 0
while True:
print("\nIteration:", counter) # You can set a breakpoint here while the loop runs
num1 = counter
num2 = counter + 1
sum_result = calculate_sum(num1, num2) # Step into this function during debugging
print(f"The sum of {num1} and {num2} is: {sum_result}")
greet("Debugger") # Also step into this function if needed
counter += 1
# Add a sleep to slow down the loop and make debugging easier
time.sleep(2)