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/debugger/debug-64-bit-applications.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Debug and troubleshoot 64-Bit applications
3
3
description: Learn how to debug a 64-bit application with Visual Studio. There are tips for troubleshooting unexpected debugging delays.
4
-
ms.date: 11/04/2016
4
+
ms.date: 04/16/2025
5
5
ms.topic: how-to
6
6
dev_langs:
7
7
- CSharp
@@ -24,9 +24,9 @@ You can debug a 64-bit application that is running on the local computer or on a
24
24
25
25
To debug a 64-bit application that is running on a remote computer, see [Remote Debugging](../debugger/remote-debugging.md).
26
26
27
-
To debug 64-bit applications locally, Visual Studio uses a 64-bit worker process (msvsmon.exe) to perform the low-level operations that cannot be done inside of the 32-bit Visual Studio process.
27
+
To debug 64-bit applications locally, Visual Studio uses a 64-bit worker process (msvsmon.exe) to perform the low-level operations that can't be done inside of the 32-bit Visual Studio process.
28
28
29
-
Mixed-mode debugging is not supported for 64-bit processes that use .NET Framework version 3.5 or earlier.
29
+
Mixed-mode debugging isn't supported for 64-bit processes that use .NET Framework version 3.5 or earlier.
30
30
31
31
## Debug a 64-bit Application
32
32
@@ -46,9 +46,9 @@ You might see an error: "A 64-bit debugging operation is taking longer than expe
46
46
47
47
There are two main causes for this error:
48
48
49
-
- You have networking security software installed on your computer that has caused the networking stack to be unreliable, and it has dropped packets going over `localhost`. Try disabling all network security software and see whether this resolves it. If so, report to your network security software vendor that the software is interfering with `localhost` traffic. This should not occur with Visual Studio 2019 and later, because those versions don't use sockets for this communication.
49
+
- You have networking security software installed on your computer that has caused the networking stack to be unreliable, and it has dropped packets going over `localhost`. Try disabling all network security software and see whether this resolves it. If so, report to your network security software vendor that the software is interfering with `localhost` traffic. This shouldn't occur with Visual Studio 2019 and later, because those versions don't use sockets for this communication.
50
50
51
-
- You are running into an issue where Visual Studio becomes unresponsive, or other performance problem. If the problem happens regularly, you can collect dumps of Visual Studio (devenv.exe) and the worker process (msvsmon.exe) and send them to Microsoft. For information about reporting a problem, see [How to Report a Problem with Visual Studio](../ide/how-to-report-a-problem-with-visual-studio.md).
51
+
- You're running into an issue where Visual Studio becomes unresponsive, or other performance problem. If the problem happens regularly, you can collect dumps of Visual Studio (devenv.exe) and the worker process (msvsmon.exe) and send them to Microsoft. For information about reporting a problem, see [How to Report a Problem with Visual Studio](../ide/how-to-report-a-problem-with-visual-studio.md).
Copy file name to clipboardExpand all lines: docs/debugger/get-started-debugging-multithreaded-apps.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Learn to debug multithreaded applications
3
3
description: Debug multithreaded applications by using the Parallel Stacks and Parallel Watch windows in the Visual Studio integrated development environment (IDE).
Copy file name to clipboardExpand all lines: docs/debugger/how-to-debug-from-a-dll-project.md
+38-31Lines changed: 38 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
-
title: Debug a DLL Project from the project itself
3
-
description: You can start the debugging of a DLL project from the project itself, by specifying the calling app in the project properties. See this article for details.
4
-
ms.date: 4/21/2023
2
+
title: Debug a DLL Project from the Project Itself
3
+
description: Learn how to start debugging a DLL project from the project itself by specifying the calling application in the project properties.
4
+
ms.date: 04/18/2025
5
5
ms.topic: how-to
6
6
dev_langs:
7
7
- CSharp
@@ -17,96 +17,103 @@ author: mikejo5000
17
17
ms.author: mikejo
18
18
manager: mijacobs
19
19
ms.subservice: debug-diagnostics
20
+
#customer intent: As a developer, I want to debug a DLL project from the project itself in Visual Studio, so I can trigger debug actions from the calling application.
20
21
---
21
22
# Debug from a DLL project in Visual Studio (C#, C++, Visual Basic, F#)
22
23
23
-
One way to debug a DLL project is to specify the calling app in the DLL project properties. Then you can start debugging from the DLL project itself. For this method to work, the app must call the same DLL in the same location as the one you configure. If the app finds and loads a different version of the DLL, that version won't contain your breakpoints. For other methods of debugging DLLs, see [Debugging DLL projects](../debugger/debugging-dll-projects.md).
24
+
One way to debug a DLL project is to specify the calling app in the DLL project properties. This approach lets you start debugging from the DLL project itself. For this method to work, the app must call the same DLL in the same location as the one you configure. If the app finds and loads a different version of the DLL, that version doesn't contain your breakpoints. For other methods of debugging DLLs, see [Debugging DLL projects](../debugger/debugging-dll-projects.md).
24
25
25
26
If your managed app calls a native DLL, or your native app calls a managed DLL, you can debug both the DLL and the calling app. For more information, see [How to: Debug in mixed mode](../debugger/how-to-debug-in-mixed-mode.md).
26
27
27
28
Native and managed DLL projects have different settings to specify calling apps.
28
29
29
30
## Specify a calling app in a native DLL project
30
31
31
-
1.Select the C++ DLL project in **Solution Explorer**. Select the **Properties**icon, press **Alt**+**Enter**, or right-click and choose **Properties**.
32
+
1.In **Solution Explorer**, right-click the C++ DLL project and select **Properties**(**Alt**+**Enter**).
32
33
33
-
1. In the **\<Project> Property Pages** dialog box, make sure the **Configuration** field at the top of the window is set to **Debug**.
34
+
1. In the **\<Project> Property Pages** dialog, set the **Configuration** field at the top to **Debug**.
:::image type="content" source="../debugger/media/dbg-debugging-properties-dll.png" alt-text="Screenshot of the Debug Properties window in Visual Studio showing the value for the command." lightbox="../debugger/media/dbg-debugging-properties-dll.png":::
42
43
43
44
1. Add any necessary program arguments to the **Command Arguments** box.
44
45
45
46
1. Select **OK**.
46
47
47
48
::: moniker range=">= vs-2022"
48
-
## Specify a calling app in a C# DLL project (.NET Core, .NET 5+)
49
49
50
-
1. Select the C# or Visual Basic DLL project in **Solution Explorer**. Select the **Properties** icon, press **Alt**+**Enter**, or right-click and choose **Properties**.
50
+
## Specify a calling app in a managed DLL project (.NET Core, .NET 5+)
51
+
52
+
1. In **Solution Explorer**, right-click the C# or Visual Basic DLL project and select **Properties** (**Alt**+**Enter**).
51
53
52
54
1. In the Debug tab, select **Open Debug launch profiles UI**.
53
55
54
-
1. In the Launch Profiles dialog box, select the **Create a new profile** icon, and choose**Executable**.
56
+
1. In the **Launch Profiles** dialog, select the **Create a new profile** icon, and select**Executable**.
55
57
56
-
:::image type="content" source="../debugger/media/vs-2022/dbg-profile-create-new.png" alt-text="Screenshot of the UI to create a new debug profile.":::
58
+
:::image type="content" source="../debugger/media/vs-2022/dbg-profile-create-new.png" border="false" alt-text="Screenshot of the UI to create a new debug profile in Visual Studio 2022." lightbox="../debugger/media/vs-2022/dbg-profile-create-new.png":::
57
59
58
60
1. In the new profile, under **Executable**, browse to the location of the executable (*.exe* file) and select it.
59
61
60
-
1. In the Launch Profiles dialog box, note the name of the default profile, then select it and delete it.
62
+
1. In the **Launch Profiles** dialog, note the name of the default profile, then select the profile and delete it.
61
63
62
64
1. Rename the new profile to the same name as the default profile.
63
65
64
-
Alternatively, you can manually edit *launchSettings.json*to get the same result. You want the first profile in *launchSettings.json* to match the name of the Class Library, and you want it listed first in the file.
66
+
An alternate approach is to manually edit the *launchSettings.json*file. You want the first profile in the *launchSettings.json*file to match the name of the Class Library, and you want the profile listed first in the file.
65
67
66
68
::: moniker-end
67
69
68
-
## Specify a calling app in a managed DLL project
70
+
## Specify a calling app in a managed DLL project (.NET Framework)
69
71
70
-
1.Select the C# or Visual Basic DLL project in **Solution Explorer**. Select the **Properties**icon, press **Alt**+**Enter**, or right-click and choose **Properties**.
72
+
1.In **Solution Explorer**, right-click the C# or Visual Basic DLL project and select **Properties**(**Alt**+**Enter**).
71
73
72
-
1.Make sure that the **Configuration** field at the top of the window is set to **Debug**.
74
+
1.Set the **Configuration** field at the top to **Debug**.
73
75
74
76
1. Under **Start action**:
75
77
76
78
- For .NET Framework DLLs, select **Start external program**, and add the fully qualified path and name of the calling app.
77
79
78
-
- Or, select **Start browser with URL** and fill in the URL of a local ASP.NET app.
80
+
- Or, select **Start browser with URL** and enter the URL of a local ASP.NET app.
79
81
80
82
::: moniker range=">= vs-2022"
81
-
- For .NET Core DLLs in Visual Basic, the **Debug** Properties page is different. Select **Executable** from the **Launch** dropdown, and then add the fully qualified path and name of the calling app in the **Executable** field.
83
+
84
+
- For .NET Core DLLs in Visual Basic, the **Debug** Properties page is different. Expand the **Launch** dropdown and select **Executable**, and then add the fully qualified path and name of the calling app in the **Executable** field.
85
+
82
86
::: moniker-end
83
87
::: moniker range="<= vs-2019"
84
-
- For .NET Core DLLs, the **Debug** Properties page is different. Select **Executable** from the **Launch** dropdown, and then add the fully qualified path and name of the calling app in the **Executable** field.
88
+
89
+
- For .NET Core DLLs, the **Debug** Properties page is different. Expand the **Launch** dropdown and select **Executable**, and then add the fully qualified path and name of the calling app in the **Executable** field.
90
+
85
91
::: moniker-end
86
92
87
93
1. Add any necessary command-line arguments in the **Command line arguments** or **Application arguments** field.
:::image type="content" source="../debugger/media/dbg-debugging-properties-dll-csharp.png" border="false" alt-text="Screenshot of the C# Debug Properties window in Visual Studio." lightbox="../debugger/media/dbg-debugging-properties-dll-csharp.png":::
90
96
91
-
1.Use **File** > **Save Selected Items**or **Ctrl**+**S** to save changes.
97
+
1.To save your changes, select **File** > **Save Selected Items**(**Ctrl**+**S**).
92
98
93
99
## Debug from the DLL project
94
100
95
101
1. Set breakpoints in the DLL project.
96
102
97
-
1. Right-click the DLL project and choose**Set as Startup Project**.
103
+
1. Right-click the DLL project and select**Set as Startup Project**.
98
104
99
-
1.Make sure the **Solutions Configuration** field is set to **Debug**. Press**F5**, click the green **Start** arrow, or select **Debug** > **Start Debugging**.
105
+
1.Set the **Solutions Configuration** field at the top to **Debug**. Select**F5** and then select the green **Start** arrow, or select **Debug** > **Start Debugging**.
100
106
101
-
Additional tips:
102
-
103
-
- If debugging does not hit your breakpoints, make sure that your DLL output (by default, the *\<project>\Debug* folder) is the location that the calling app is calling.
104
-
105
-
- If you want to break into code in a managed calling app from a native DLL, or vice versa, enable [mixed mode debugging](../debugger/how-to-debug-in-mixed-mode.md).
106
-
107
-
- In some scenarios, you may need to tell the debugger where to find the source code. For more information, see [Use the No Symbols Loaded/No Source Loaded pages](../debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md#use-the-no-symbols-loadedno-source-loaded-pages).
107
+
> [!TIP]
108
+
>
109
+
> - If debugging doesn't hit your breakpoints, make sure your DLL output (by default, the *\<project>\Debug* folder) is the target call location for the calling app.
110
+
>
111
+
> - If you want to break into code in a managed calling app from a native DLL, or vice versa, enable [mixed mode debugging](../debugger/how-to-debug-in-mixed-mode.md).
112
+
>
113
+
> - In some scenarios, you might need to instruct the debugger where to find the source code. For more information, see [Use the No Symbols Loaded/No Source Loaded pages](../debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md#use-the-no-symbols-loadedno-source-loaded-pages).
Copy file name to clipboardExpand all lines: docs/debugger/how-to-use-the-modules-window.md
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: View DLLs and executables in Visual Studio
3
3
description: View DLLs and executables (.exe files) that your app uses in the Modules window during a debugging session in Visual Studio.
4
4
titleSuffix: Visual Studio Modules window
5
-
ms.date: 11/04/2018
5
+
ms.date: 04/16/2025
6
6
ms.topic: how-to
7
7
f1_keywords:
8
8
- vs.debug.modules
@@ -31,15 +31,17 @@ During Visual Studio debugging, the **Modules** window lists and shows informati
31
31
> [!NOTE]
32
32
> The Modules window is not available for SQL or script debugging.
33
33
34
-
## Use the Modules window
34
+
## View modules
35
35
36
36
To open the Modules window, while you're debugging, select **Debug** > **Windows** > **Modules** (or press **Ctrl + Alt + U**).
37
37
38
38
By default, the **Modules** window sorts modules by load order. To sort by any window column, select the header at the top of the column.
39
39
40
40
## Load symbols
41
41
42
-
The **Symbol Status** column in the **Modules** window shows which modules have debugging symbols loaded. If the status is **Skipped loading symbols**, **Cannot find or open the PDB file**, or **Loading disabled by include/exclude setting**, you can load symbols manually. For more information about loading and using symbols, see [Specify symbol (.pdb) and source files](../debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md).
42
+
The **Symbol Status** column in the **Modules** window shows which modules have debugging symbols loaded. If the status is **Skipped loading symbols**, **Cannot find or open the PDB file**, or **Loading disabled by include/exclude setting**, you can load symbols manually.
43
+
44
+
- For more information about loading and using symbols, see [Specify symbol (.pdb) and source files](../debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md).
43
45
44
46
**To load symbols manually:**
45
47
@@ -49,6 +51,12 @@ The **Symbol Status** column in the **Modules** window shows which modules have
49
51
50
52
- Select **Load Symbols** to load the symbols manually.
51
53
54
+
- For .NET code, you can choose **Decompile Source to Symbol File** and then follow instructions in [Generate and embed sources for an assembly](../debugger/decompilation.md#generate-and-embed-sources-for-an-assembly).
55
+
56
+
::: moniker range=">=vs-2022"
57
+
Starting in Visual Studio 2022 version 17.7, you can also autodecompile .NET code. For more information, see [Autodecompile code](../debugger/decompilation.md#autodecompile-code).
58
+
::: moniker-end
59
+
52
60
1. If the symbols don't load, select **Symbol Settings** to open the **Options** dialog, and specify or change symbol loading locations.
53
61
54
62
You can download symbols from the public Microsoft Symbol Servers or other servers, or load symbols from a folder on your computer. For details, see [Configure location of symbol files and loading behavior](../debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md#configure-location-of-symbol-files-and-loading-options).
Copy file name to clipboardExpand all lines: docs/debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -300,6 +300,7 @@ During debugging, the **Modules** window shows the code modules the debugger is
300
300
|**Symbol Load Information**|Shows the location of a loaded symbol file, or the locations that were searched if the debugger cannot find the file.|
301
301
|**Symbol Settings**|Opens the **Options** > **Debugging** > **Symbols** page, where you can edit and add symbol locations.|
302
302
|**Always Load Automatically**|Adds the selected symbol file to the list of files that are automatically loaded by the debugger.|
303
+
|**Decompile Source to Symbol File**|For .NET code, you can choose this option and then follow instructions in [Generate and embed sources for an assembly](../debugger/decompilation.md#generate-and-embed-sources-for-an-assembly).|
303
304
304
305
### Use the No Symbols Loaded/No Source Loaded pages
0 commit comments