Visual Studio를 사용하여 UWP(유니버설 Windows 플랫폼) 애플리케이션용으로 생성된 C++ 코드를 디버깅할 수 있습니다.
IL2CPP 클래스는 <ClassName>_t#number
포맷을 따릅니다.
<ClassName>
는 클래스명입니다.#number
는 고유 타입 번호입니다.예시 IL2CPP 클래스:
String_t
- String 클래스
Object_t
- Object 클래스
Type_t
- Type 클래스
StringBuilder_t26
- StringBuilder 클래스
IL2CPP 메서드는 <ClassName>_<MethodName>_m#number
포맷을 따릅니다.
<ClassName>
은 메서드의 선언 타입 클래스명입니다.<MethodName>
은 메서드명입니다.#number
는 고유 메서드 번호입니다.예시 IL2CPP 메서드:
ConfigurationSection_DoDeserializeSection_m1275
- ConfigurationSection 클래스의 DeserializationSection 메서드
String_Format_m4102
- String 클래스의 Format 메서드
Mathf_Sqrt_m289
- Mathf 클래스의 Sqrt 메서드
정적 필드 구조는 <ClassName>_t#number_StaticFields
포맷을 따르며, 여기서 구조 이름의 첫 번째 부분은 선언 타입과 동일합니다.
예시 정적 필드 구조:
StringBuilder_t26_StaticFields
Thing_t24_StaticFields
각 클래스나 메서드 정의 앞에 C++은 전체 클래스명 또는 메서드명을 명시하는 코멘트를 생성합니다.
예시 C++ 코멘트:
// System.Text.StringBuilder
struct StringBuilder_t26 : public Object_t
{
// System.Int32 System.Text.StringBuilder::_length
int32_t length_1;
// System.Int32 System.Text.StringBuilder::_maxCapacity
int32_t maxCapacity_2;
};
Visual Studio 디버거를 사용해 변수 값을 관측하여 생성된 C++ 코드를 디버깅할 수 있습니다.
변수를 관측할 수 있도록 디버거를 멈추게 할 Visual Studio에 중단점을 설정할 수 있습니다.Visual Studio에서는 변수 위에 마우스를 두거나 Watch 창을 사용하여 변수 값을 관측할 수 있습니다.
IL2CPP에서 Unity는 정적 필드를 Il2CppClass 인스턴스에 저장합니다.정적 필드 값을 관측하려면 다음 단계를 따르십시오.
static_fields
필드의 값을 검색합니다.이는 특정 타입에 대한 정적 필드가 포함된 메모리 블록에 대한 포인터 입니다.IL2CPP는 네이티브 C++ 예외를 사용하여 .NET 예외를 구현합니다.
코드에서 예외를 분석하려면 다음을 수행합니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.