Disassembly view for C++
During a debug session you can open the disassembled C++ code
on demand for any frame when the sources are available,
by force stepping into it when the sources are not available.
Right-click the desired frame in the Debug tool window and select Disassemble:
Disassembly view will be opened side-by-side with the source code:
Once opened, the disassembly view stays synchronized with the currently selected frame. When frames are switched, both the editor and the disassembly view scroll to the execution point.
note
All the debug actions described below are available in this side-by-side view, with an exception that currently JetBrains Rider does not mirror breakpoints between the source file and the disassembly view.
When debugging your code, use the Force Step Into
command instead of Step Into F11. Step Into acts like Step Over for functions with no source code.
Disassembly view opens automatically when JetBrains Rider cannot locate the source files during debugging.
Navigate to the desired frame in the Debug tool window.
Disassembly also opens automatically when you launch a debug session for the attached process that does not provide debug information.
While in disassembly view, you can investigate your code using regular stepping actions.
tip
Stepping in disassembly and in the original sources behaves differently: although debugger always steps line-by-line, a line in the source code usually contains multiple instructions, while a line in disassembly always corresponds to a single instruction.
You can also use the Set Execution Point action to jump to an arbitrary line of code in disassembly:

You can set breakpoints in disassembly the same way you do in the source code. These breakpoints are called address breakpoints.
Right-click a breakpoint to view the available options:

Click More or press CtrlAlt0B to edit address breakpoints in the Breakpoints dialog:

note
When you stop a debug session, address breakpoints are removed automatically, because most of the time the address layout changes on the next launch.
Use the Go to field to jump to a desired code line. In this field, you can enter an address or any expression that can be evaluated into an address.
If you need to include a register into the expression, start its name with $
(the GDB notation).

tip
Using registers in the Go to field while debugging with LLDB requires explicit cast to address. For example,
(void *)($pc + 0x8)
.
Syntax highlighting is available for AT&T assembly code. By default, the .s and .asm files are recognized as assembly code files, but you can configure other types. To do this, in the Settings/Preferences dialog (CtrlAlt0S) , go to Editor | File Types. Select Assembly Language in the list of recognized file types and add a new extension to the list.
Syntax highlighting is available for AT&T assembly code.
By default, the .s and .asm files are recognized as assembly code files, but you can configure other types:
Go to Settings | Editor | File Types.
Select Assembly Language in the list of recognized file types and add a new extension to the list.