mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 20:41:22 +07:00
First iteration. Minor errors fixed. Merge-request: IJ-MR-154104 Merged-by: Egor Eliseev <Egor.Eliseev@jetbrains.com> GitOrigin-RevId: c4410fdf09edef7c0974ecb6bb15dbd465defbca
27 lines
833 B
Python
27 lines
833 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("Hello, {name}!".format(name=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("The sum of {num1} and {num2} is: {sum_result}".format(num1=num1, num2=num2, sum_result=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) |