Skip to content

Commit 320a6ef

Browse files
authored
Merge pull request #3180 from WilliamAntonRohm/vs-how-to-use-the-disassembly-window
how-to-use-the-disassembly-window -- freshness update
2 parents 1887aac + f2d3b57 commit 320a6ef

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed
Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "View Disassembly Code in the Debugger in Visual Studio | Microsoft Docs"
33
ms.custom: "H1Hack27Feb2017"
4-
ms.date: "11/04/2016"
4+
ms.date: "10/30/2018"
55
ms.technology: "vs-ide-debug"
66
ms.topic: "conceptual"
77
f1_keywords:
@@ -24,46 +24,48 @@ manager: douge
2424
ms.workload:
2525
- "multiple"
2626
---
27-
# View Disassembly Code in the Visual Studio Debugger
28-
This feature is available only if address-level debugging is enabled the **Options** dialog box, **Debugging** node. It is not available for Script or SQL debugging.
27+
# View disassembly code in the Visual Studio debugger
28+
29+
The **Disassembly** window shows assembly code corresponding to the instructions created by the compiler. If you're debugging managed code, these assembly instructions correspond to the native code created by the Just-in-Time (JIT) compiler, not the Microsoft intermediate language (MSIL) created by the Visual Studio compiler.
2930

30-
The **Disassembly** window shows assembly code corresponding to the instructions created by the compiler. If you are debugging managed code, these assembly instructions correspond to the native code created by the Just-in-Time (JIT) compiler, not the Microsoft intermediate language (MSIL) generated by the Visual Studio compiler.
31+
> [!NOTE]
32+
> To take full advantage of the **Disassembly** window, understand or learn the basics of [assembly-language programming](https://wikipedia.org/wiki/Assembly_language).
3133
32-
In addition to assembly instructions, the **Disassembly** window can show the following optional information:
34+
This feature is only available if address-level debugging is enabled. It isn't available for script or SQL debugging.
35+
36+
In addition to assembly instructions, the **Disassembly** window can show the following optional information:
3337

34-
- Memory address where each instruction is located. For native applications, this is the actual memory address. For Visual Basic, C#, or managed code, it is an offset from the beginning of the function.
38+
- Memory address where each instruction is located. For native applications, it is the actual memory address. For Visual Basic, C#, or managed code, it's an offset from the beginning of the function.
3539

3640
- Source code from which the assembly code derives.
3741

38-
- Code bytesbyte representations of the actual machine or MSIL instructions.
42+
- Code bytes, that is, the byte representations of the actual machine or MSIL instructions.
3943

4044
- Symbol names for the memory addresses.
4145

4246
- Line numbers corresponding to the source code.
4347

44-
Assembly-language instructions consist of mnemonics, which are abbreviations for instruction names, and symbols that represent variables, registers, and constants. Each machine-language instruction is represented by one assembly-language mnemonic, usually followed by one or more variables, registers, or constants.
45-
46-
If you cannot read assembly language and want to take full advantage of the Disassembly window, consult a good book on assembly-language programming. Assembly-language programming is beyond the scope of what we can address in this brief introduction to the Disassembly window.
48+
Assembly-language instructions consist of *mnemonics*, which are abbreviations for instruction names, and *symbols* for variables, registers, and constants. Each machine-language instruction is represented by one assembly-language mnemonic optionally followed by one or more symbols.
4749

48-
Because assembly code relies heavily on processor registers or, in the case of managed code, common language runtime registers, you will often find it useful to use the Disassembly window in conjunction with the Registers window, which allows you to examine register contents.
50+
Assembly code relies heavily on processor registers or, for managed code, common language runtime registers. You can use the **Disassembly** window along with the **Registers** window, which allows you to examine register contents.
4951

50-
You probably will never have the desire or need to view machine-code instructions in their raw, numeric form, rather than assembly language. However, if you want to do so, you can use the Memory window for that purpose or choose Code Bytes from the shortcut menu in the Disassembly window.
52+
To view machine-code instructions in their raw numeric form, rather than as assembly language, use the **Memory** window or select **Code Bytes** from the shortcut menu in the **Disassembly** window.
5153

54+
## Use the Disassembly window
55+
56+
To enable the **Disassembly** window, under **Tools** > **Options** (or **Tools** > **Options**) > **Debugging**, select **Enable address-level debugging**.
57+
58+
To open the **Disassembly** window during debugging, select **Windows** > **Disassembly** or press **Alt**+**8**.
59+
5260
> [!NOTE]
5361
> The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose **Import and Export Settings** on the **Tools** menu. For more information, see [Personalize the Visual Studio IDE](../ide/personalizing-the-visual-studio-ide.md).
5462
55-
### To display the Disassembly window
56-
57-
- While you are debugging, select **Debug > Windows** and then click **Disassembly**.
58-
59-
### To turn optional information on or off
60-
61-
- Right-click the **Disassembly** window, and set or clear the desired options in the shortcut menu.
62-
63-
A yellow arrow in the left margin marks the location of the current execution point. For native code, this corresponds to the CPU's program counter. This location shows the next instruction that will be executed in your program.
64-
65-
For more information, see [Paging Up or Down in Memory](../debugger/how-to-page-up-or-down-in-memory.md).
66-
67-
## See Also
68-
[Viewing Data in the Debugger](../debugger/viewing-data-in-the-debugger.md)
69-
[How to: Use the Registers Window](../debugger/how-to-use-the-registers-window.md)
63+
To turn optional information on or off, right-click in the **Disassembly** window, and set or clear the desired options in the shortcut menu.
64+
65+
A yellow arrow in the left margin marks the current execution point. For native code, the execution point corresponds to the CPU's program counter. This location shows the next instruction that will be executed in your program.
66+
67+
## See also
68+
69+
* [Paging up or down in memory](../debugger/how-to-page-up-or-down-in-memory.md)
70+
* [Viewing data in the debugger](../debugger/viewing-data-in-the-debugger.md)
71+
* [How to: Use the Registers window](../debugger/how-to-use-the-registers-window.md)

0 commit comments

Comments
 (0)