Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Breakpoint
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Types of breakpoints== === Machine breakpoints === Early mainframe computers, such as the [[IBM/360]], had console switches/dials that allowed breakpoints at specific instruction storage addresses and provided "single cycle" operation, permitting the contents of registers and memory to be observed directly on console lights. The advent of multitasking limited the use of this option since the entire machine was halted. === Non-interactive breakpoints === Programmers have used machine code patches to implement single destructive breakpoints to cause a [[core dump]] since the early days of computers. The core dump provided the state of the registers and memory at the exact moment of the deliberate "crash". === Interactive breakpoints === The advent of [[teletypewriter]] consoles in the 1960s allowed more interactive [[command line]] debugging capabilities but it was not until the early 1970s and the arrival of ubiquitous [[video monitor]]s connected to [[mainframe computer|mainframe]]s that fully interactive, full screen debugging in multitasking environments became a reality. This also permitted step-by-step program execution in a true [[program animation]] manner with optional register and memory alterations simultaneously displayed. Initially this type of animation was at the level of [[disassembler|disassembled]] or [[decompiled]] machine code, but later advanced to [[high-level programming language|HLL]] source level animation. ===Conditional breakpoints=== Breakpoints are most commonly used to interrupt a running program immediately before the execution of a programmer-specified [[Instruction (computer science)|instruction]]. This is often referred to as an ''instruction breakpoint''. Other kinds of conditions can also be used, such as the reading, writing, or modification of a specific location in an area of memory. This is often referred to as a ''data breakpoint'', or a ''watchpoint''. Many systems also support breakpoints that are only active if a condition is met (such as a variable having a certain value), usually referred to as ''conditional breakpoint''.<ref>{{Cite web |title=FAQ How do I set a conditional breakpoint? |url=https://wiki.eclipse.org/FAQ_How_do_I_set_a_conditional_breakpoint%3F |access-date=2023-04-19 |website=Eclipse Wiki}}</ref> ===Inspection tools=== When a breakpoint is hit, various tools are used to inspect the state of the program or alter it. [[Stack trace]] of each [[Thread (computer science)|thread]] may be used to see the chain of [[Subroutine|function]] calls that led to the paused instruction. A list of ''watches'' allows one to view the values of selected [[Variable (programming)|variables]] and [[Expression (programming)|expressions]]. There may also be tools to show the contents of [[Processor register|registers]], loaded program [[Module (programming)|modules]] and other information. ===Logpoints=== A ''logpoint'' is a type of breakpoint that only prints (or [[Logging (computing)|"logs"]]) information instead of interrupting execution. Usually the developer can specify a message and/or values of variables to print when execution reaches a specific point.<ref>{{Cite web |last=Walsh |first=David |date=2021-03-22 |title=Use Logpoints! |url=https://davidwalsh.name/logpoints |access-date=2023-04-19 |website=David Walsh Blog |language=en}}</ref> Logpoints are an alternative to putting logging statements into the program being debugged (sometimes called [[Debugging#Techniques|''printf debugging'']]), and particularly helpful when changing the program is not practical (for example when debugging an external library called by the program).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)