Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of the square/diamond breakpoint in Visual Studio?

I placed 2 breakpoints and one of them turned square. What does it mean? If it helps I am remotely debugging some code.

screenshot of the breakpoints window

like image 261
transporter_room_3 Avatar asked Mar 28 '19 09:03

transporter_room_3


People also ask

What is breakpoint in Visual Studio code?

Breakpoints are one of the most important debugging techniques in your developer's toolbox. You set breakpoints wherever you want to pause debugger execution. For example, you may want to see the state of code variables or look at the call stack at a certain breakpoint.

Why do we use breakpoint in C#?

A breakpoint helps to speed up the debugging process in a large program by allowing the execution to continue up to a desired point before debugging begins. This is more efficient than stepping through the code on a line-by-line basis.

How do breakpoints work?

Software Breakpoint They work by patching the code you are trying to execute with an instruction that triggers a debug event in some fashion. This is accomplished by injecting a breakpoint instruction or when that is not supported by inserting an instruction that causes a fault that halts the core.


2 Answers

It means execution will not break at that breakpoint, but only a message will be output in the debugging log.

To change this, right click on the breakpoint and choose "Settings" (In older VS Version) or "Actions" (starting with VS 2017).

enter image description here

See this question for why this is useful:

  • What are tracepoints used for?
like image 147
NineBerry Avatar answered Oct 19 '22 20:10

NineBerry


square breakpoint you mention is Breakpoint actions and tracepoints.

According to docs.microsoft.com debugger using breakpoint

A tracepoint is a breakpoint that prints a message to the Output window. A tracepoint can act like a temporary trace statement in the programming language.

You can change the breakpoint setting by click on setting button near breakpoint by moving cursor to breakpoint.

like image 35
Huynh Viet Avatar answered Oct 19 '22 21:10

Huynh Viet