본문 바로가기
Programming/Visual Studio, VSC

[Visual Studio] 외부 라이브러리 코드(External Code) 디버깅하기

by 째스터 2024. 2. 16.
728x90

가끔 라이브러리 코드를 디버깅하고 싶을 때가 있다.
Visual Studio에서 Tools > Options 클릭한다.
아래 Debugging 메뉴를 선택하고 Enable Just My Code를 체크 해제한다.

 

잘 동작하는지 확인해 보자.
아래와 같이 외부 코드에 중단점을 걸고, F11(Step Into)을 클릭한다.

다음과 같이 외부 코드지만 디버깅할 수 있게 되었다.

아래 링크에서 Swashbuckle.AspNetCore package의 실제 소스코드와 동일한 것을 확인할 수 있다.

https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/master/src/Swashbuckle.AspNetCore.SwaggerGen/DependencyInjection/SwaggerGenServiceCollectionExtensions.cs


참고
- https://learn.microsoft.com/en-us/visualstudio/debugger/just-my-code?view=vs-2022

 

Debug user code with Just My Code - Visual Studio (Windows)

Just My Code is a debugging feature that automatically steps over calls to non-user code. Learn how to enable, disable, and use this feature.

learn.microsoft.com

 

728x90

댓글