VS 2003 Tip #15: Attaching devenv to a process from the command line.

Ziv posted: “I've often wondered how to do the equivalent of "windbg -pn ProcessName" in VS.NET. Is it possible?”

I dont know of a way to attach a devenv via a command line to a process by name, but I do know how to do it by Process ID (PID). Just run the following command from a command shell: vs7jit.exe -p PID. Click “Yes” to debug with a new instance of VS7.1. Then follow through the events to attach your Everett shell to the process to debug it natively or with managed code.

I just spoke to Gregg about this too, and he got that maniacal look in his eye and started telling me ways to script this or use an exe project to do this. When Gregg gets that look, I normally step away, clear the decks so that his brain can operate at full speed with no distractions and pretty much let him say or do what he wants. His net net was that he was going to blog about it, so check out http://weblogs.asp.net/greggm soon for more info on this.

Hope that helps.

Comments (10)

  1. Ziv Caspi says:

    Yes, I know how to do it a process ID. Using the executable name, however, is infinitely nicer. For example, instead of writing a script to identify the process ID of a service by parsing the output of tlist, you can just attach by name. Or use WinDBG instead, which is whay I do today.

  2. you can just attach by name

Skip to main content