專案設計工具、偵錯頁Debug Page, Project Designer

使用專案設計工具的 [偵錯頁面] 設定在 Visual Basic 或 C# 專案中的偵錯行為屬性。Use the Debug page of the Project Designer to set properties for debugging behavior in a Visual Basic or C# project.

若要存取 [偵錯] 頁面,請選取方案總管中的專案節點。To access the Debug page, select a project node in Solution Explorer. 在 [專案] 功能表上,選擇 [<專案名稱> 屬性]。On the Project menu, choose <ProjectName> Properties. 當專案設計工具出現時,請按一下 [偵錯] 索引標籤。When the Project Designer appears, click the Debug tab.

Note

本主題不適用於 UWP 應用程式。This topic does not apply to UWP apps. 若為 UWP 應用程式,請參閱啟動偵錯工作階段 (VB、C#、C++ 和 XAML)See Start a debug session (VB, C#, C++ and XAML) for UWP apps.

組態和平台Configuration and Platform

下列選項可讓您選取要顯示或修改的設定和平台。The following options allow you to select the configuration and platform to display or modify.

組態Configuration

指定要顯示或修改的組態設定。Specifies which configuration settings to display or modify. 設定可以是 [偵錯] (預設)、[發行] 或 [所有設定]。The settings can be Debug (default), Release, or All Configurations.

平台Platform

指定要顯示或修改的平台設定。Specifies which platform settings to display or modify. 選項可以包括 [任何 CPU] (預設)、[x64]和 [x86]。The choices can include Any CPU (default), x64, and x86.

起始動作Start action

起始動作指出在對應用程式進行偵錯時要啟動的項目:專案、自訂程式、URL 或不啟動任何項目。Start action indicates the item to start when the application is debugged: the project, a custom program, a URL, or nothing. 根據預設,這個選項會設為 [起始專案]。By default, this option is set to Start project. [偵錯] 頁面上的 [起始動作] 設定會決定 StartAction 屬性的值。The Start Action setting on the Debug page determines the value of the StartAction property.

起始專案Start project

選擇這個選項可指定在對應用程式進行偵錯時,應該要啟動可執行檔 (適用於 Windows 應用程式和主控台應用程式專案)。Choose this option to specify that the executable (for Windows Application and Console Application projects) should be started when the application is debugged. 預設會選取這個選項。This option is selected by default.

起始外部程式Start external program

選擇這個選項可指定在對應用程式進行偵錯時,應該要啟動特定程式。Choose this option to specify that a specific program should be started when the application is debugged.

以 URL 啟動瀏覽器Start browser with URL

選擇這個選項可指定在對應用程式進行偵錯時,應該要存取特定 URL。Choose this option to specify that a particular URL should be accessed when the application is debugged.

起始選項Start options

命令列引數Command line arguments

在這個文字方塊中,輸入要用於偵錯的命令列引數。In this text box, enter the command-line arguments to use for debugging.

工作目錄Working directory

在這個文字方塊中,輸入將從中啟動專案的目錄。In this text box, enter the directory from which the project will be launched. 或按一下 [瀏覽] 按鈕 (...) 選擇目錄。Or click the Browse button (...) to choose a directory.

使用遠端電腦Use remote machine

若要從遠端電腦對應用程式進行偵錯,請選取此核取方塊,然後在文字方塊中輸入遠端電腦的路徑。To debug the application from a remote computer, select this check box, and enter the path to the remote computer in the text box.

偵錯工具引擎Debugger engines

啟用機器碼偵錯Enable native code debugging

這個選項會指定是否支援原生程式碼的偵錯。This option specifies whether debugging of native code is supported. 如果您正在呼叫 COM 物件,或如果您啟動以原生程式碼撰寫的自訂程式,而它會呼叫您的專案且您必須對原生程式碼進行偵錯,請選取此核取方塊。Select this check box if you are making calls to COM objects or if you start a custom program written in native code that calls your project and you must debug the native code. 清除此核取方塊可停用非受控碼的偵錯。Clear this check box to disable debugging of unmanaged code. 此核取方塊預設為清除。This check box is cleared by default.

啟用 SQL Server 偵錯Enable SQL Server debugging

選取或清除此核取方塊,可啟用或停用從 Visual Basic 應用程式進行 SQL 程序的偵錯。Select or clear this check box to enable or disable debugging of SQL procedures from your Visual Basic application. 此核取方塊預設為清除。This check box is cleared by default.

另請參閱See also