Microsoft Developer Network > 포럼 홈 > Visual Studio Debugger > debug process spawned by other process...
질문하기질문하기
 

답변됨debug process spawned by other process...

  • 2009년 7월 1일 수요일 오후 8:06JaedenRuiner 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I have an application which uses Process.Start() to spawn another applicaiton.  Both are my projects, but currently, I have some older versions and I'd like to debug what is happening in the "secondary" process. 
    So, I have my "update" project open in visual studio, and i set the "start external program" to myapp.exe which calls out to update.exe.  But I can't debug it.  I'm trying to find a way to have visual studio execute the MyApp.exe, and wait for the breakpoint in update.exe when myapp.exe executes the update application.  Is this possible to do?

    Thanks
    Jaeden "Sifo Dyas" al'Raec Ruiner
    "Never Trust a computer. Your brain is smarter than any micro-chip."

답변

모든 응답

  • 2009년 7월 3일 금요일 오전 6:18Roahn LuoMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     

    Hello,

    Based on my understanding, we mainly have two projects, one of them named "MyApp.exe" and the other "update.exe". The breakpoint was set in the update.exe. In MyApp.exe, we use Process.Start() to launch the update.exe. What we want is to get the breakpoint in update.exe hit when debugging MyApp.exe in Visual Stduio. Please correct me if I'm wrong.

    If I'm correct, please try the steps below to get the breakpoint hit:
     1. set MyApp.exe as startup project and press F5 to start debugging
     2. right after the update.exe was launched, please click Tools -> Attach to process...
     3. find update.exe process and attach it to the Visual Studo Debugger
     4. get the breakpoint hit

    Will you please have a try and tell me the result?
    Thanks a lot!


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
  • 2009년 7월 6일 월요일 오후 2:50JaedenRuiner 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    So i basicaly have to step over the Process.Start line, and then attach the generated process to the debugger.  thanks, I'll try that

    J"SD"a'RR

    "Never Trust a computer. Your brain is smarter than any micro-chip."
  • 2009년 7월 9일 목요일 오전 2:40Roahn LuoMSFT, 중재자사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hello,

    A few days have passed, I am eager to know if my suggestion help you, how about the result? Does the breakpoint get hit if we follow the steps above?

    Best regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!