Share via


FileVersionInfo.IsDebug 속성

정의

파일에 디버깅 정보가 포함되어 있는지 여부 또는 디버깅 기능이 활성화된 상태에서 파일이 컴파일되었는지 여부를 지정하는 값을 가져옵니다.

public:
 property bool IsDebug { bool get(); };
public bool IsDebug { get; }
member this.IsDebug : bool
Public ReadOnly Property IsDebug As Boolean

속성 값

파일에 디버깅 정보가 포함되어 있거나 디버깅 기능이 활성화된 상태에서 파일을 컴파일하면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에서는 를 호출 GetVersionInfo 하여 메모장에 대한 를 가져옵니다 FileVersionInfo . 그런 다음 텍스트 상자에 부울 IsDebug 의 상태를 표시합니다. 이 코드는 인스턴스화되었다고 가정합니다 textBox1 .

private:
    void GetIsDebug()
    {
        // Get the file version for the notepad.
        FileVersionInfo^ myFileVersionInfo =
            FileVersionInfo::GetVersionInfo( Environment::SystemDirectory + "\\Notepad.exe" );

        // Print whether the file contains debugging information.
        textBox1->Text = String::Concat( "File contains debugging information: ",
            myFileVersionInfo->IsDebug );
    }
private void GetIsDebug()
{
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo =
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\\Notepad.exe");

    // Print whether the file contains debugging information.
    textBox1.Text = "File contains debugging information: " +
        myFileVersionInfo.IsDebug;
}
Private Sub GetIsDebug()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")
    
    ' Print whether the file contains debugging information.
    textBox1.Text = "File contains debugging information: " & myFileVersionInfo.IsDebug
End Sub

설명

속성은 FileVersionInfo 파일에 기본 제공되는 버전 리소스 정보를 기반으로 합니다. 버전 리소스는 종종 .exe 또는 .dll 파일과 같은 이진 파일에 기본 제공됩니다. 텍스트 파일에 버전 리소스 정보가 없습니다.

버전 리소스는 일반적으로 Win32 리소스 파일 또는 어셈블리 특성에 지정됩니다. 속성은 IsDebug Win32 리소스 파일의 리소스에서 VERSIONINFO 빌드된 파일 블록의 VS_FIXEDFILEINFO 플래그 값을 반영 VS_FF_DEBUG 합니다. Win32 리소스 파일에서 버전 리소스를 지정하는 방법에 대한 자세한 내용은 플랫폼 SDK About Resource Files 항목 및 VERSIONINFO Resource 항목 topics 참조하세요.

적용 대상