You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extensibility/debugger/choosing-a-debug-engine-implementation-strategy.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -14,11 +14,11 @@ manager: douge
14
14
ms.workload:
15
15
- "vssdk"
16
16
---
17
-
# Choosing a Debug Engine Implementation Strategy
18
-
Use the run-time architecture to determine your debug engine (DE) implementation strategy. The debug engine may be created in-process to the program to be debugged, in-process to the Visual Studio session debug manager (SDM), or out-of-process to both of them. The following guidelines should help you to choose among these three strategies.
17
+
# Choose a debug engine implementation strategy
18
+
Use the run-time architecture to determine your debug engine (DE) implementation strategy. You can create the debug engine in-process to the program you're debugging, in-process to the Visual Studio session debug manager (SDM), or out-of-process to both of them. The following guidelines should help you to choose among these three strategies.
19
19
20
20
## Guidelines
21
-
While it is possible for the DE to be out-of-process to both the SDM and the program to be debugged, there is typically no reason to do so. Calls across process boundaries are relatively slow.
21
+
While it is possible for the DE to be out-of-process to both the SDM and the program you're debugging, there is typically no reason to do so. Calls across process boundaries are relatively slow.
22
22
23
23
Debug engines are already provided for the Win32 native run-time environment and for the common language runtime environment. If you must replace the DE for either of these environments, you must create the DE in-process with the SDM.
24
24
@@ -28,5 +28,5 @@ Use the run-time architecture to determine your debug engine (DE) implementation
28
28
29
29
- If the DE must call the program to access the symbol store, create the DE in-process with the program. In this case, the program creates the instance of the DE.
30
30
31
-
## See Also
32
-
[Visual Studio Debugger Extensibility](../../extensibility/debugger/visual-studio-debugger-extensibility.md)
31
+
## See also
32
+
[Visual Studio debugger extensibility](../../extensibility/debugger/visual-studio-debugger-extensibility.md)
Copy file name to clipboardExpand all lines: docs/extensibility/debugger/code-context.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -14,19 +14,19 @@ manager: douge
14
14
ms.workload:
15
15
- "vssdk"
16
16
---
17
-
# Code Context
17
+
# Code context
18
18
In [!INCLUDE[vsprvs](../../code-quality/includes/vsprvs_md.md)] debugging, a **code context**:
19
19
20
20
- Provides an abstraction of a position in code as known to the debug engine (DE). For most run-time architectures today, a code context can be thought of as an address in a program's instruction stream. For nontraditional languages, where code may not be represented by instructions, a code context may be represented by some other means.
21
21
22
-
- Describes the current position in the execution stream of the program being debugged.
22
+
- Describes the current position in the execution stream of the program you're debugging.
23
23
24
24
- Exists only when a program has stopped at a breakpoint.
25
25
26
26
- Has an associated document context.
27
27
28
28
- Is implemented by an [IDebugCodeContext2](../../extensibility/debugger/reference/idebugcodecontext2.md) interface.
Copy file name to clipboardExpand all lines: docs/extensibility/debugger/common-language-runtime-and-expression-evaluation.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -15,22 +15,22 @@ manager: douge
15
15
ms.workload:
16
16
- "vssdk"
17
17
---
18
-
# Common Language Runtime and Expression Evaluation
18
+
# Common language runtime and expression evaluation
19
19
> [!IMPORTANT]
20
-
> In Visual Studio 2015, this way of implementing expression evaluators is deprecated. For information about implementing CLR expression evaluators, please see [CLR Expression Evaluators](https://github.com/Microsoft/ConcordExtensibilitySamples/wiki/CLR-Expression-Evaluators) and [Managed Expression Evaluator Sample](https://github.com/Microsoft/ConcordExtensibilitySamples/wiki/Managed-Expression-Evaluator-Sample).
20
+
> In Visual Studio 2015, this way of implementing expression evaluators is deprecated. For information about implementing CLR expression evaluators, please see [CLR expression evaluators](https://github.com/Microsoft/ConcordExtensibilitySamples/wiki/CLR-Expression-Evaluators) and [Managed expression evaluator sample](https://github.com/Microsoft/ConcordExtensibilitySamples/wiki/Managed-Expression-Evaluator-Sample).
21
21
22
22
Compilers, such as Visual Basic and C# (pronounced C-sharp), that target the Common Language Runtime (CLR), produce Microsoft Intermediate Language (MSIL), which is later compiled to native code. The CLR provides a debug engine (DE) to debug the resulting code. If you plan to integrate your proprietary programming language into the Visual Studio IDE, you can choose to compile to MSIL and therefore will not have to write your own DE. However, you will have to write an expression evaluator (EE) that is capable of evaluating expressions within the context of your programming language.
23
23
24
24
## Discussion
25
25
Computer language expressions are generally parsed to produce a set of data objects and a set of operators used to manipulate them. For example, the expression "A+B" might be parsed to apply the addition operator (+) to the data objects "A" and "B," possibly resulting in another data object. The total set of data objects, operators, and their associations are most often represented in a program as a tree, with the operators at the nodes of the tree and the data objects at the branches. An expression that has been broken down into tree form is often called a parsed tree.
26
26
27
-
Once an expression has been parsed, a symbol provider (SP) is called to evaluate each data object. For example, if "A" is defined both in more than one method, then the question "Which A?" must be answered before the value of A can be ascertained. The answer returned by the SP is something like "The third item on the fifth stack frame" or "The A that is 50 bytes beyond the start of the static memory allocated to this method."
27
+
Once an expression has been parsed, a symbol provider (SP) is called to evaluate each data object. For example, if "A" is defined both in more than one method, the question "Which A?" must be answered before the value of A can be ascertained. The answer returned by the SP is something like "The third item on the fifth stack frame" or "The A that is 50 bytes beyond the start of the static memory allocated to this method."
28
28
29
-
Besides producing MSIL for the program itself, CLR compilers can also produce very descriptive debugging information that is written into a Program DataBase (.pdb) file. As long as a proprietary-language compiler produces debug information in the same format as the CLR compilers, the CLR's SP is able to identify that language's named data objects. Once a named data object has been identified, the EE uses a binder object to associate (or bind) the data object to the memory area that holds the value of that object. The DE can then get or set a new value for the data object.
29
+
Besides producing MSIL for the program itself, CLR compilers can also produce very descriptive debugging information that is written into a Program DataBase (*.pdb*) file. As long as a proprietary-language compiler produces debug information in the same format as the CLR compilers, the CLR's SP is able to identify that language's named data objects. Once a named data object has been identified, the EE uses a binder object to associate (or bind) the data object to the memory area that holds the value of that object. The DE can then get or set a new value for the data object.
30
30
31
31
A proprietary compiler can provide CLR debugging information by calling the `ISymbolWriter` interface (which is defined in the .NET Framework in the namespace `System.Diagnostics.SymbolStore`). By compiling to MSIL and writing debug information through these interfaces, a proprietary compiler can use the CLR DE and SP. This greatly simplifies integrating a proprietary language into the Visual Studio IDE.
32
32
33
-
When the CLR DE calls the proprietary EE to evaluate an expression, the DE supplies the EE with interfaces to an SP and a binder object. Thus, writing a CLR-based debug engine means it is necessary only to implement the appropriate expression evaluator interfaces; the CLR takes care of the binding and the symbol handling for you.
33
+
When the CLR DE calls the proprietary EE to evaluate an expression, the DE supplies the EE with interfaces to an SP and a binder object. Thus, writing a CLR-based debug engine means it's necessary only to implement the appropriate expression evaluator interfaces; the CLR takes care of the binding and the symbol handling for you.
34
34
35
-
## See Also
36
-
[Writing a CLR Expression Evaluator](../../extensibility/debugger/writing-a-common-language-runtime-expression-evaluator.md)
35
+
## See also
36
+
[Write a CLR expression evaluator](../../extensibility/debugger/writing-a-common-language-runtime-expression-evaluator.md)
Copy file name to clipboardExpand all lines: docs/extensibility/debugger/control-events.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ manager: douge
14
14
ms.workload:
15
15
- "vssdk"
16
16
---
17
-
# Control Events
17
+
# Control events
18
18
You must send events during the controlled execution of your program. All of the events are sent using the [IDebugEvent2](../../extensibility/debugger/reference/idebugevent2.md) interface and have attributes that require you to implement the [IDebugEvent2::GetAttributes](../../extensibility/debugger/reference/idebugevent2-getattributes.md) method.
19
19
20
-
## Additional Methods
20
+
## Additional methods
21
21
Some events require implementation of additional methods, as follows:
22
22
23
23
- Sending the [IDebugEngineCreateEvent2](../../extensibility/debugger/reference/idebugenginecreateevent2.md) interface when the debug engine (DE) is initialized requires you to implement the [IDebugEngineCreateEvent2::GetEngine](../../extensibility/debugger/reference/idebugenginecreateevent2-getengine.md) method.
@@ -34,5 +34,5 @@ You must send events during the controlled execution of your program. All of the
34
34
35
35
For your engine to write string-style output, you must implement the [IDebugOutputStringEvent2::GetString](../../extensibility/debugger/reference/idebugoutputstringevent2-getstring.md) method.
36
36
37
-
## See Also
38
-
[Execution Control and State Evaluation](../../extensibility/debugger/execution-control-and-state-evaluation.md)
37
+
## See also
38
+
[Execution control and state evaluation](../../extensibility/debugger/execution-control-and-state-evaluation.md)
Copy file name to clipboardExpand all lines: docs/extensibility/debugger/control-of-execution.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -14,27 +14,27 @@ manager: douge
14
14
ms.workload:
15
15
- "vssdk"
16
16
---
17
-
# Control of Execution
17
+
# Control of execution
18
18
The debug engine (DE) typically sends one of the following events as the last startup event:
19
19
20
20
- The entry point event, if attaching to a newly launched program
21
21
22
22
- The load complete event, if attaching to a program that is already running
23
23
24
-
Both these events are stopping events, meaning that the DE waits for a response from the user by means of the IDE. For more information, see [Operational Modes](../../extensibility/debugger/operational-modes.md).
24
+
Both these events are stopping events, meaning that the DE waits for a response from the user by means of the IDE. For more information, see [Operational modes](../../extensibility/debugger/operational-modes.md).
25
25
26
-
## Stopping Event
26
+
## Stopping event
27
27
When a stopping event is sent to the debug session:
28
28
29
29
1. The program and thread that contain the current instruction pointer can be obtained from the event interface.
30
30
31
-
2. The IDE determines the current source code file and position, which it displays highlighted in the editor.
31
+
2. The IDE determines the current source code file and position, which it displays as highlighted in the editor.
32
32
33
33
3. The debug session typically responds to this first stopping event by calling the program's **Continue** method.
34
34
35
-
4. The program then runs until it encounters a stopping condition, such as hitting a breakpoint, in which case the DE sends a breakpoint event to the debug session. The breakpoint event is a stopping event, and the DE again waits for a user response.
35
+
4. The program then runs until it encounters a stopping condition, such as hitting a breakpoint. In which case, the DE sends a breakpoint event to the debug session. The breakpoint event is a stopping event, and the DE again waits for a user response.
36
36
37
-
5. If the user elects to step into, over, or out of a function, the IDE prompts the debug session to call the program's `Step` method, passing it the unit of step (instruction, statement, or line) and the kind of step—that is, whether to step into, over, or out of the function. When the step is complete, the DE sends a step complete event to the debug session, which is a stopping event.
37
+
5. If the user elects to step into, over, or out of a function, the IDE prompts the debug session to call the program's `Step` method. The IDE then passes the unit of step (instruction, statement, or line) and the type of step (whether to step into, over, or out of the function). When the step is complete, the DE sends a step complete event to the debug session, which is a stopping event.
38
38
39
39
-or-
40
40
@@ -48,13 +48,13 @@ The debug engine (DE) typically sends one of the following events as the last st
48
48
49
49
The SDM typically responds to this first stopping event by calling [IDebugProgram2::Continue](../../extensibility/debugger/reference/idebugprogram2-continue.md). The program then runs until it encounters a stopping condition, such as hitting a breakpoint, in which case the DE sends an [IDebugBreakpointEvent2 Interface](../../extensibility/debugger/reference/idebugbreakpointevent2.md) to the SDM. The breakpoint event is a stopping event, and the DE again waits for a user response.
50
50
51
-
If the user elects to step into, over, or out of a function, the IDE prompts the SDM to call [IDebugProgram2::Step](../../extensibility/debugger/reference/idebugprogram2-step.md), passing it the [STEPUNIT](../../extensibility/debugger/reference/stepunit.md) (instruction, statement, or line) and the [STEPKIND](../../extensibility/debugger/reference/stepkind.md), that is, whether to step into, over, or out of the function. When the step is complete, the DE sends an [IDebugStepCompleteEvent2](../../extensibility/debugger/reference/idebugstepcompleteevent2.md) interface to the SDM, which is a stopping event.
51
+
If the user elects to step into, over, or out of a function, the IDE prompts the SDM to call [IDebugProgram2::Step](../../extensibility/debugger/reference/idebugprogram2-step.md). The IDE then passes the [STEPUNIT](../../extensibility/debugger/reference/stepunit.md) (instruction, statement, or line) and the [STEPKIND](../../extensibility/debugger/reference/stepkind.md), that is, whether to step into, over, or out of the function. When the step is complete, the DE sends an [IDebugStepCompleteEvent2](../../extensibility/debugger/reference/idebugstepcompleteevent2.md) interface to the SDM, which is a stopping event.
52
52
53
53
If the user elects to continue executing from the current instruction pointer, the IDE asks the SDM to call [IDebugProgram2::Execute](../../extensibility/debugger/reference/idebugprogram2-execute.md). The program resumes execution until it encounters the next stopping condition.
54
54
55
-
If the debug package is to ignore a particular stopping event, the debug package calls the SDM, which calls [IDebugProgram2::Continue](../../extensibility/debugger/reference/idebugprogram2-continue.md). If the program was stepping into, over, or out of a function when it encountered the stopping condition, then it continues the step. This implies that the program maintains a stepping state, so that it knows how to continue.
55
+
If the debug package is to ignore a particular stopping event, the debug package calls the SDM, which calls [IDebugProgram2::Continue](../../extensibility/debugger/reference/idebugprogram2-continue.md). If the program was stepping into, over, or out of a function when it encountered the stopping condition, it continues the step. This implies that the program maintains a stepping state, so that it knows how to continue.
56
56
57
57
The calls the SDM makes to `Step`, **Execute**, and **Continue** are asynchronous, which means that the SDM expects the call to return quickly. If the DE sends the SDM a stopping event on the same thread before `Step`, **Execute**, or **Continue** returns, the SDM hangs.
0 commit comments