Skip to main content
All docs
V24.2

Debug DevExpress .NET Source Code with PDB Symbols

  • 2 minutes to read

DevExpress Universal or DXperience subscription (v22.1+) includes debug symbols that allow you to debug DevExpress .NET Components referenced in your applications.

Follow the steps below to prepare your environment for debugging DevExpress Components.

  1. To install debug symbols, check the Source Code & Symbols option when you install DevExpress Components.

    select-product-to-install-dialog

    When this option is enabled, the installer installs DevExpress components’ source and symbol files, and registers symbol files in Visual Studio for the current user:

    register pdb files in visual studio

    Tip

    DevExpress source files are installed in the C:\Program Files\DevExpress 24.2\Components\Sources\ folder.

  2. Navigate to Debug | Options and uncheck “Enable Just My Code”.

    disable just my code

  3. Specify a path with the DevExpress sources in your solution properties: right-click the solution and navigate to Properties | Common Properties | Debug Source Files. Add a source to the DevExpress Component sources.

    pdb specify sources folder

    Refer to the following Microsoft article for more information: Specify symbol (.pdb) and source files in the Visual Studio debugger

Now, your environment is ready to debug DevExpress components. Set a breakpoint anywhere in DevExpress code and run your application in the Debug configuration. Press F11 to step into DevExpress components source code.

Refer to the following topic for more information: Visual Studio debugger documentation.

Troubleshooting

I cannot inspect a local variable value

Visual Studio may display the following message:

Cannot obtain value of local or argument as it is not available at this instruction pointer, possibly because it has been optimized away.

JIT optimization may have a side effect that does not allow you to watch local variables. Refer to the following topic for more information on debugging optimization: JIT Optimization and Debugging.

To ignore native images compiled with Ngen.exe, you can use scripts listed in the following table:

Visual Studio Version

OS Architecture

x86

x64

VS 2010

VS2010_x86_nojit.cmd

VS2010_x64_nojit.cmd

VS 2012

VS2012_x86_nojit.cmd

VS2012_x64_nojit.cmd

VS 2013

VS2013_x86_nojit.cmd

VS2013_x64_nojit.cmd

VS 2015

VS2015_x86_nojit.cmd

VS2015_x64_nojit.cmd

VS 2019

-

VS2019_x64_nojit.cmd

VS 2022

-

VS2022_x64_nojit.cmd

The cursor is positioned on a code line that does not match the call stack

This issue may occur if you have not disabled debugging optimization. Refer to the previous section to fix the issue.

See Also