Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

What is the purpose of breakpoints? [closed]

Asked by
Faazo 84
6 years ago
Edited 6 years ago

When you are writing a script and you click beside the line number, a red dot/sphere appears. When I right click it, it refers to it as a "Breakpoint". This left me wondering. Does anybody know what this is? If so please tell me. Thanks.

Locked by User#19524

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
6
Answered by
valchip 789 Moderation Voter
6 years ago

Breakpoints are the checkpoints in your code. If a breakpoint is set, when Roblox is run (Play Solo, or the Run key) the system will pause when it tries to execute that line of code. To set a breakpoint you simply click to the left of the line of code you want to pause the system. This will create a red dot which indicates you want your code to break there. Once this is set, the next time you "Play Solo" or "Run" your game with this script inside it the game will pause right before executing this line of code. You can remove a breakpoint by clicking on it.

Just search on wiki next time http://wiki.roblox.com/index.php?title=Lua_debugger

Ad
Log in to vote
1
Answered by
Ribasu 127
6 years ago
Edited 6 years ago

The program will pause when arriving at the indicated break point marker. At that point, you can go back to your code and check the state of your program e.g. a particular variable, and you may also execute the program step by step from that point. In this way you can run through your program and understand if your code is behaving as you expect. You can resume normal execution of your program when you are finished with your analysis.

This is a powerful debugging tool, and a general programming concept... but you can have the specific information over here at the Roblox wiki.