

Visual studio code debug with iis windows#
(The list is not exhaustive.)įor some app types, like Universal Windows App (UWP) apps, you don't attach directly to a process name, but use the Debug Installed App Package menu option in Visual Studio instead (see table).įor the debugger to attach to code written in C++, the code needs to emit DebuggableAttribute. To help you determine whether to use Attach to Process and what process to attach to, the following table shows a few common debugging scenarios, with links to more instructions where available.

The Reattach to Process command is available starting in Visual Studio 2017.
Visual studio code debug with iis install#
To obtain tlist.exe, download and install Debugging Tools for Windows, available at WDK and WinDbg downloads.

You can determine the process ID using tlist.exe. If neither of those workarounds is possible, a third option is to attach to the process by running vsjitdebugger.exe -p from the Windows command line. You can solve the problem by running Visual Studio under an administrator account or by running Visual Studio from the server console instead of a Terminal Services session. Session 0 is used for services and other server processes, including w3wp.exe. If you are running Visual Studio as a user who has a limited user account, the Available processes list won't show processes that are running in Session 0. In some cases, when you debug in a Remote Desktop (Terminal Services) session, the Available processes list won't display all available processes. You can set the active app in the Visual Studio Debug Location toolbar or Processes window. You can be attached to multiple apps for debugging, but only one app is active in the debugger at a time. Verify that Visual Studio adds the required port to the computer name, which appears in the format: :port Type the computer name in the Connection target box and press Enter. Select the drop-down arrow next to Connection target, and select the computer name from the drop-down list. In the Connection target box, select the remote computer, using one of the following methods:

For more info, see other sections in this article or Common debugging scenarios. Some scenarios, such as debugging Linux or a containerized app, require a different connection type. In Visual Studio, select Debug > Attach to Process (or press Ctrl+ Alt+ P) to open the Attach to Process dialog box. To attach to a running process on a remote computer: For more information, see Remote debugging.įor more complete instructions for debugging ASP.NET applications that have been deployed to IIS, see Remote debugging ASP.NET on a remote IIS computer. The remote debugger ( msvsmon.exe) must be running on the remote computer. You can also select a remote computer in the Attach to Process dialog box, view a list of available processes running on that computer, and attach to one or more of the processes for debugging.
