성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Java - How to use the Foreign Funct...
[정성태] 제가 큰 실수를 했군요. ^^; Delegate를 통한 Bein...
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>새로운 Visual Studio 2012 원격 디버깅 툴</h1> <p> <br /> "Visual Studio Remote Debugger"라고 불리던 툴들이 2012로 오면서 "Remote Tools"라는 이름으로 변경되었습니다. Visual Studio 2012가 RTM 되면서 "Remote Tools"도 함께 다음의 링크에서 배포되고 있는데요.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Remote Tools for Visual Studio 2012 ; <a target='tab' href='http://www.microsoft.com/en-us/download/details.aspx?id=30674'>http://www.microsoft.com/en-us/download/details.aspx?id=30674</a> </pre> <br /> 2012 원격 디버깅 툴에서 변경된 점이 있다면, 가장 아쉬운 "Windows 서버 2003 미지원"에 대한 사항이 있습니다. 명세상으로는 심지어 Vista까지도 지원을 하지 않습니다. 따라서, 이런 운영체제에 실행되고 있는 응용 프로그램을 디버깅하려면 Visual Studio 2010으로 연결해야만 합니다. (문제군요. 그렇다면 .NET 4.5 응용 프로그램에 대해서는 Windows Server 2003에서 실행하는 경우 원격 디버깅을 할 수 없다는 이야기가 됩니다.)<br /> <br /> 계속해서, 원격 디버깅 관련하여 "방화벽" 설정을 살펴보겠습니다. (사실, Visual Studio 2010에서와 동일하지만 정리하는 차원에서 적어봅니다.)<br /> <br /> 우선, 방화벽으로 인해 원격 디버깅이 안 되는 경우 다음과 같은 오류 화면을 볼 수 있습니다.<br /> <br /> <img alt='rdbg_port_firewall_1.png' src='/SysWebRes/bbs/rdbg_port_firewall_1.png' /><br /> <br /> <div style='BACKGROUND-COLOR: #ccffcc; padding: 10px 10px 5px 10px; MARGIN: 0px 10px 10px 10px; FONT-FAMILY: Malgun Gothic, Consolas, Verdana; COLOR: #005555'> Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named '...'. This operation returned because the timeout period expired.<br /> </div><br /> <br /> 이런 경우, 몇몇 개의 외부 블로그를 참조하는 것이 도움이 되는데요.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Configuring XP SP2 to enable remote debugging for VS 2002/2003 ; <a target='tab' href='http://blogs.msdn.com/b/greggm/archive/2004/08/30/222935.aspx'>http://blogs.msdn.com/b/greggm/archive/2004/08/30/222935.aspx</a> Description of the DebuggerFirewall utility that makes the Visual Studio Remote Debugger work through the Windows XP Service Pack 2 firewall ; <a target='tab' href='http://support.microsoft.com/?kbid=841177'>http://support.microsoft.com/?kbid=841177</a> How to turn on remote debugging in Windows XP with Service Pack 2, in Windows Server 2003 Service Pack 1, or in Windows Vista ; <a target='tab' href='http://support.microsoft.com/kb/833977'>http://support.microsoft.com/kb/833977</a> </pre> <br /> "원격 디버깅"은 특이하게 해당 컴퓨터로의 연결뿐만 아니라, 그 컴퓨터에서 디버거가 위치한 컴퓨터로의 연결도 가능해야 합니다. 일단 대상 컴퓨터는 방화벽을 완전하게 풀어놓았다고 가정하고, Visual Studio가 위치한 측의 방화벽에 대해서만 살펴보겠습니다. (원격 컴퓨터 측의 설정은 <a target='tab' href='How to turn on remote debugging in Windows XP with Service Pack 2, in Windows Server 2003 Service Pack 1, or in Windows Vista'>http://support.microsoft.com/kb/833977</a> 글에 포함돼 있습니다.)<br /> <br /> <hr style='width: 50%' /><br /> <br /> 원격 디버깅을 위해 Visual Studio가 실행되는 컴퓨터에 기본적으로 다음과 같은 포트를 열어주어야 합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > TCP 135 UDP 4500 UDP 500 "File and Print Sharing" 켜기 File and Printer Sharing (NB-Session-In) (TCP 139) File and Printer Sharing (SMB-In) (TCP 445) File and Printer Sharing (NB-Name-In) (UDP 137) File and Printer Sharing (NB-Datagram-In) (UDP 138) </pre> <br /> TCP 135, UDP 4500, UDP 500은 그냥 수작업으로 등록해 주어야 하지만, 나머지 "File and Print Sharing"과 관련해서는 Firewall 설정 프로그램에 다음과 같이 미리 입력되어 있기 때문에 이것들만 골라서 "Yes"로 돌려주면 됩니다.<br /> <br /> <img onclick='toggle_img(this)' class='imgView' alt='rdbg_port_firewall_2.png' src='/SysWebRes/bbs/rdbg_port_firewall_2.png' /><br /> <br /> 또한, 응용 프로그램을 등록해 주어야 하는데, "제어판" / "Windows Firewall" 패널에서 좌측의 "Allow an app or feature through Windows Firewall" 링크를 눌러서, Visual Studio 2012 프로그램을 추가합니다. (참고로 설치된 경로가 맞는지 - 예를 들어, "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" - 반드시 확인합니다.)<br /> <br /> 보통의 경우, 위와 같이만 해주면 잘 동작할 텐데요. 특정한 상황에서 여전히 다음과 같은 오류가 발생할 수 있습니다.<br /> <br /> <div style='BACKGROUND-COLOR: #ccffcc; padding: 10px 10px 5px 10px; MARGIN: 0px 10px 10px 10px; FONT-FAMILY: Malgun Gothic, Consolas, Verdana; COLOR: #005555'> Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor named '...'. The Visual Studio Remote Debugger on the target computer cannot connect back to this computer. A firewall may be preventing communication via DCOM to the local computer. Please see Help for assistance.<br /> </div><br /> <br /> 확인을 위해 대상 컴퓨터에서 ping으로 Visual Studio가 설치된 PC로 통신이 되는지 확인을 합니다. (Ping을 위한 ICMP 테스트를 위해 방화벽에서 "File and Printer Sharing (Echo Request - ICMPv4-In)" 항목을 활성화해야 합니다.)<br /> <br /> 이때, IP로 한 번 해보고 컴퓨터 명으로도 한 번 해봅니다. 만약 IP로는 되는데 컴퓨터 명으로는 안 된다면 수작업으로 HOSTS 파일에 등록을 해주면 원격 디버깅이 정상적으로 동작할 수 있게 됩니다.<br /> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
6375
(왼쪽의 숫자를 입력해야 합니다.)