Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to label (set Title) for IIS Express process?

I have a solution with multiple websites and I have been using Cassini for development. When IIS Express came out, I transitioned one of the websites to use it, and everything has been running fine. I just moved another website to use IIS Express and immediately ran into a problem with debugging: IIS Express does not label its processes, so now that I have two of them running, I can't tell them apart in the "Attach to process" dialog.

Is there a way to have IIS Express set the process title? Anyone have any tips for telling multiple IIS Express instances apart for the purposes of attaching the debugger?

Update A round-about way of doing this is to execute "Show all applications" context menu of the IIS Express tray icon and reference the PID from the list when attaching the debugger. Better than nothing, but would be nice if there was a better way.

Update 2 I added a connect issue: https://connect.microsoft.com/VisualStudio/feedback/details/729475/impossible-to-differentiate-iis-express-instances-when-attaching-debugger

like image 419
Michael Teper Avatar asked Jun 17 '11 22:06

Michael Teper


2 Answers

Alternatively, you can add this code to start the debugger from inside your page. It's fast and easy, and you can just use a hidden local page to call it and start your debugger.

System.Diagnostics.Debugger.Launch();
like image 188
Aristos Avatar answered Sep 29 '22 05:09

Aristos


I run the IISExpress instances from a batch file. The name of the cmd file then shows up as the process name in Attach to Process.

eg: have this in the MySite.cmd file

"C:\Program Files (x86)\IIS Express\iisexpress.exe" /siteid:1

Would show up in the Title colum in Attach to Process as

MySite

like image 25
Boycs Avatar answered Sep 29 '22 05:09

Boycs