共用方式為


VCProjectConfigurationProperties.RemoteCommand 屬性

如果 Attach 為 false 且 Remote 指定遠端偵錯,則可執行檔會在您叫用偵錯工具時啟動。 如果 Attach 為 true 且 Remote 指定遠端偵錯,則 RemoteCommand 屬性會指定當您叫用偵錯工具時偵錯處理序應附加至的處理序。

命名空間:  Microsoft.VisualStudio.VCProject
組件:  Microsoft.VisualStudio.VCProject (在 Microsoft.VisualStudio.VCProject.dll 中)

語法

'宣告
Property RemoteCommand As String
string RemoteCommand { get; set; }
property String^ RemoteCommand {
    String^ get ();
    void set (String^ value);
}
abstract RemoteCommand : string with get, set
function get RemoteCommand () : String
function set RemoteCommand (value : String)

屬性值

型別:System.String
應該要附加偵錯處理程序。

備註

如需這個範例的編譯與執行等詳細資訊,請參閱 HOW TO:編譯專案模型擴充性的範例程式碼

範例

[Visual Basic]

下列範例程式碼修改RemoteCommand在開發環境中的屬性:

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim mystring As String
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCDebugSettings
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.DebugSettings
        tool.Remote = RemoteDebuggerType.DbgRemote
        tool.RemoteCommand = "test.exe"
    End Sub
End Module

.NET Framework 安全性

請參閱

參考

VCProjectConfigurationProperties 介面

Microsoft.VisualStudio.VCProject 命名空間