https://kotlinlang.org logo
#getting-started
Title
# getting-started
t

thhh

04/12/2021, 2:34 PM
I often need to add break points to different small code in a file. The usecase is to see the entire flow of code using breakpoint, but now I need to manually add many breakpoints to intellij IDEA. Is there a way to add breakpoint to all the possible code lines at once so I can simply do that and observe the code flow?
y

Youssef Shoaib [MOD]

04/12/2021, 2:58 PM
Simply place one breakpoint at the start of the code then click on step over (first button in this picture):
👍 1
Screenshot from 2021-04-12 15-58-21.png
r

Roukanken

04/12/2021, 4:51 PM
ye, after you hit your first breakpoint, you can then decide how to continue, the most used ones are basically run till next breakpoint (forgot IntelliJ's name) - what you been using so far probably run till next (executed) line in this function, (or breakpoint, w/e is sooner) - "Step Over" run till next line inside the function current line calls - "Step Into" (they also have default shortcuts of F7, F8, F9 iirc, so that's useful)
👍 1
2 Views