Skip to main content
All docs
V22.2

Collect Call Stack

  • 3 minutes to read

If you see Visual Studio IDE instability, in which DevExpress IDE Tools might be involved, you can capture the problem’s call stack. This can help determine the cause of the Visual Studio crash or freeze issues.

This guide assumes that your Visual Studio is in one of the following states:

  • Frozen
  • Running normally (you will need to reproduce the error or crash)

Regardless of the current state, you will need to run another Visual Studio process. Configure it as a debugger, and attach it to the other process in order to obtain the required call stack.

Follow the steps below:

Attach to a Running Visual Studio Instance

  1. Run a new Visual Studio instance.

  2. In the Tools | Options… dialog, select the Debugging node and uncheck the “Enable Just My Code” check box. Click OK to close the “Options” dialog.

    uncheck-enable-just-my-code

  3. Select Debug -> Attach to Process… or press the Ctrl+Alt+P key combination.

  4. In the “Attach to Process” dialog box, find the Visual Studio instance that you want to attach from the “Available processes” list.

    attach-to-process

    If the process runs under a different user account, select the “Show processes for all users” check box.

    Note

    If you use Visual Studio 2012+ and want to debug the Visual Studio XAML designer in a .NET Framework project, attach the Visual Studio instance to the XDesProc.exe process instead of devenv.exe.

    Make sure that the type of code you want to debug is listed. Click Select… to open the “Select Code Type” dialog. In this dialog, activate the “Automatically determine the type of code to debug” option and click OK.

    attach-to-process

    Note

    Make sure that the Managed code is present in the “Attach to:” text box after you click OK.

    Click Attach.

Access Exception Settings

Select the Debug | Windows | Exception Settings menu item or press the Ctrl+Alt+E key combination. The “Exception Settings” tool window appears.

exception-settings-tool

Configure Exception Settings in the Freeze State

If Visual Studio is in the freeze state:

  1. Select the “Common Language Runtime Exceptions” item in the “Break when Thrown” list and uncheck its check box.

    uncheck-common-language-exceptions

  2. Click Break All on the Debug tool bar or press Ctrl+Alt+Break to start collecting call stacks.

    break-all

  3. Save the obtained call stacks.

Configure Exception Settings to Reproduce the Crash

  1. Select the “Common Language Runtime Exceptions” item in the “Break when Thrown” list and check its check box:

    check-common-language-exceptions

  2. Reproduce the crash. Press F5 to skip handled exceptions until the last exception is thrown before the crash. You may need to cancel breaking on exceptions that can prevent you from catching the last exception. To do this, uncheck the “Break when this exception type is thrown” check box. The following screenshot shows this action for the System.OperationCanceledException:

    cancel-exception

Save the Call Stacks

  1. Open the View | Other Windows | Command Window tool window or press Ctrl+Alt+A.

  2. Run the “Debug.ListCallStack /AllThreads /ShowExternalCode” command.

    command-window

  3. Copy and save its output in a new file (for example, use Notepad).

  4. Save the file and send the obtained call stacks to our Support Center for research.

  5. Optional. Use the “Debug->Save Dump As…” menu item to save the dump file. This helps our developers analyze the cause of the problem.