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 https://weblogs.asp.net/greggm soon for more info on this.

Hope that helps.

Comments

  • Anonymous
    April 21, 2004
    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.
  • Anonymous
    April 28, 2004
    attach your Everett
  • Anonymous
    July 14, 2004
    you can just attach by name
  • Anonymous
    July 19, 2004
    good!
  • Anonymous
    July 25, 2004
    good!
  • Anonymous
    July 29, 2004
    thank you!
  • Anonymous
    August 02, 2004
    good