Quantcast
Channel: 技术笔记 –龙堂
Viewing all articles
Browse latest Browse all 40

Attach to IIS w3wp Process for debugging

$
0
0

When you need to debug .Net application, normally you need to attach to the w3wp.exe process.

For example:

Visual Studio 2015 - Attach to Process

However, sometimes you don’t want to attach all the worker process but only like to focus the particular one, then you need to find the process id, I used to use Process Explorer tool:

Find the Process ID by Process Explorer

This method works good except it’s a little bit overkill to just find the process id, after a little digging, I found this useful command appcmd.exe provided by Microsoft:

%systemroot%\system32\inetsrv\APPCMD list wp
WP "23452" (applicationPool:MyAppPool)
WP "13076" (applicationPool:MyWebApplication)
WP "29588" (applicationPool:MyWebApi)
WP "28932" (applicationPool:MyWebService)
WP "25036" (applicationPool:MyRESTAPI)

Viewing all articles
Browse latest Browse all 40

Trending Articles