mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
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
27 lines
765 B
Python
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) |