Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)

ASP.NET Core 프로젝트의 "Enable unmanaged code debugging" 옵션 켜는 방법

.NET Core 프로젝트의 경우 프로젝트 속성 창에서 "Enable unmanaged code debugging" 옵션(EnableUnmanagedDebugging)이 없습니다. 이를 켜려면 수작업 설정이 필요한데요, 이에 대해서는 다음의 이슈에서 언급하고 있습니다.

.NET Core App project Debug properties are missing "enable native code debugging" checkbox  #1125 
; https://github.com/dotnet/project-system/issues/1125

Add support for native debugging  #2766
; https://github.com/dotnet/project-system/pull/2766

즉, launchSettings.json 파일에 다음의 옵션을 추가하면 됩니다.

"nativeDebugging": true

설정 방법은 현재 프로젝트 속성 창의 "Debug" 범주에 선택된 "Profile" 옵션을 우선 확인해야 합니다.

core_native_debug_1.png

보는 바와 같이 위에서는 "IIS Express" 프로파일로 되어 있습니다. 따라서, Visual Studio의 솔루션 탐색기에서 해당 프로젝트의 "Properties" / "launchSettings.json" 파일을 로드해,

{
    "iisSettings": {
        "windowsAuthentication": false,
        "anonymousAuthentication": true,
        "iisExpress": {
            "applicationUrl": "http://localhost:52826/",
            "sslPort": 0
        }
    },
    "profiles": {}
        "IIS Express": {
            "commandName": "IISExpress",
            "launchBrowser": true,
            "launchUrl": "api/values",
            "environmentVariables": {
                "ASPNETCORE_ENVIRONMENT": "Development"
            }
        },
        "WebApplication2": {
            "commandName": "Project",
            "launchBrowser": true,
            "launchUrl": "api/values",
            "environmentVariables": {
                "ASPNETCORE_ENVIRONMENT": "Development"
            },
            "applicationUrl": "http://localhost:52827/"
        }
    }
}

동일한 이름의 프로파일을 "profiles"에서 찾아 그곳에 nativeDebugging 옵션을 다음과 같이 추가해야 합니다.

{
    "iisSettings": {
        "windowsAuthentication": false,
        "anonymousAuthentication": true,
        "iisExpress": {
            "applicationUrl": "http://localhost:52826/",
            "sslPort": 0
        }
    },
    "profiles": {}
        "IIS Express": {
            "commandName": "IISExpress",
            "launchBrowser": true,
            "nativeDebugging": true,
            "launchUrl": "api/values",
            "environmentVariables": {
                "ASPNETCORE_ENVIRONMENT": "Development"
            }
        },
        "WebApplication2": {
            "commandName": "Project",
            "launchBrowser": true,
            "launchUrl": "api/values",
            "environmentVariables": {
                "ASPNETCORE_ENVIRONMENT": "Development"
            },
            "applicationUrl": "http://localhost:52827/"
        }
    }
}

이후 F5 키를 눌러 디버깅을 시작하면 다음과 같이 native 콜 스택도 함께 확인할 수 있습니다.

core_native_debug_2.png




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 1/18/2018]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 196  [197]  198  199 
NoWriterDateCnt.TitleFile(s)
56정성태10/3/200421660.NET Framework: 10. [.NET 리모팅] 원격개체를 호출한 클라이언트의 연결이 유효한지 판단하는 방법.
55정성태10/3/200422486COM 개체 관련: 11. 내가 생각해 보는 COM의 현재 위치
54정성태8/30/200428088VC++: 10. 내가 생각해 보는 MFC OCX와 ATL DLL에 선택 기준
53정성태11/20/200527379VC++: 9. CFtpFileFind/FtpFileFind가 일부 Unix FTP 서버에서 목록을 제대로 못 가져오는 문제
184정성태11/23/200521120    답변글 VC++: 9.1. FTP 관련 토픽파일 다운로드1
51정성태6/24/200426235VC++: 8. BSTR 메모리 할당 및 해제(MSDN Library 발췌) [1]
50정성태6/16/200419467기타: 6. 1차 데스크톱 컴퓨터 사양
49정성태6/16/200419879기타: 5. 53만 원대 Second PC 마련. ^^
48정성태3/2/200421820.NET Framework: 9. 윈도우즈 발전사를 모아 둔 사이트. [1]
47정성태11/14/200520166VS.NET IDE: 7. 한글 OS에서 Internet Explorer 6.0 with SP1의 UI 언어 바꾸는 방법
45정성태1/26/200419644기타: 4. MCAD 시험
44정성태1/26/200420421VS.NET IDE: 6. 터미널 서비스 포트 변경 ( 서버 및 클라이언트 )
46정성태1/26/200425467    답변글 VS.NET IDE: 6.1. Windows 2003 터미널 서비스 라이센스 서버 없이 접속
114정성태11/14/200516703    답변글 VS.NET IDE: 6.2. [터미널 서버 라이센스] : 활성화 시 오류
43정성태12/23/200320134기타: 3. XP/2003 개인 방화벽 설정파일 다운로드1
40정성태7/23/200323791COM 개체 관련: 10. IE BHO 개체를 개발할 때, 인터넷 익스플로러가 아닌 탐색기에서 활성화 되는 문제 해결 [1]
41김성현7/24/200322443    답변글 COM 개체 관련: 10.1. [답변]: IE BHO 개체를 개발할 때, 인터넷 익스플로러가 아닌 탐색기에서 활성화 되는 문제 해결
42정성태7/29/200320315        답변글 COM 개체 관련: 10.2. feedback 을 받기 위해서 답변 기능을 가능하게 해두었습니다.
39정성태7/17/200326194VS.NET IDE: 5. 원격 제어 3가지 방법
38정성태7/17/200322551.NET Framework: 8. IIS 서버 재설치와 ASP.NET 서비스의 문제점
36정성태7/17/200323391.NET Framework: 7. 시행착오 - WebService 참조 추가 오류
35정성태7/17/200323910.NET Framework: 6. Win2000에서의 .NET COM+ 자동 등록 오류 발생 해결
34정성태7/17/200322539VS.NET IDE: 4. VC++ 원격 디버깅파일 다운로드1
33정성태7/17/200322784VS.NET IDE: 3. Win2000 NAT 서비스
32정성태7/17/200323981COM 개체 관련: 9. _bstr_t, CComBSTR, string 클래스 사용 [1]
31정성태7/17/200320922COM 개체 관련: 8. IDL 구문에서 구조체를 pack 하는 방법
... 196  [197]  198  199