Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6253379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:58:59+00:00 2026-05-24T13:58:59+00:00

When you need to debug a Website that hosts on IIS Express, you usually

  • 0

When you need to debug a Website that hosts on IIS Express, you usually don’t restart it all over again, every time when you need to rebuilt your code. You just attach VS to the process. And the macros script helps a lot:

Public Module AttachToProcess
    Public Sub AttachToWebServer()
        Dim attached As Boolean = False
        Dim proc As EnvDTE.Process
        For Each proc In DTE.Debugger.LocalProcesses
            If (Right(proc.Name, 14) = "iisexpress.exe") Then
                proc.Attach()
                attached = True
                Exit For
            End If
        Next
        If attached = False Then
            MsgBox("iisexpress.exe is not running")
        End If
    End Sub
End Module

You can assign a keystroke and voila. The only problem is if your solution contains more than one webapp, there would be more than one iisexpress.exe processes with different PIDs, and VS would sometimes choose the wrong one.

The question: Is it possible to popup a dialog if there is more than one iisexpress.exe running to choose the right one?

Of course you can always use default ‘Attach To Proccess’ dialog, but it’s not gonna be as quick as using that script and keyboard shortcut.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:59:00+00:00Added an answer on May 24, 2026 at 1:59 pm

    You can open a dialog, but it’s not the most straightforward thing. You will need to put all your UI code into the macro, EG layout, size of controls, etc…

    It’s about 200ish lines of code, and rather than put it all here I will defer you to my blog at http://www.brianschmitt.com/2010/09/save-and-change-tool-layout-in-visual.html

    You should be able to reuse the View Switcher dialog box and list out all instances of IISExpress. It shouldn’t take much to do what you need it to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need debug some old code that uses a Hashtable to store response from
I need to debug a class library project that is provided to the main
I have a process that spawns a helper process. Sometimes I need to debug
I need to pass -Dlog4j.debug to tomcat through command line, how to do that
I've inherited some code that I need to debug. It isn't working at present.
I've just inherited a website (ASP.Net 2.0) written by someone else that I need
I need to debug JavaScript in Internet Explorer 7. Unfortunately, its default debugger doesn't
I sometimes need to debug JS in other browsers, and it would be really
I have a situation where i need to debug a Windows CE application in
I have a java class and I need to debug it (put breakpoints and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.