@@ -63,18 +63,19 @@ public enum LaunchCompleteCommand
63
63
/// </summary>
64
64
public sealed class PipeLaunchOptions : LaunchOptions
65
65
{
66
- public PipeLaunchOptions ( string PipePath , string PipeArguments )
66
+ public PipeLaunchOptions ( string PipePath , string PipeArguments , string PipeCommandArguments )
67
67
{
68
68
if ( string . IsNullOrEmpty ( PipePath ) )
69
69
throw new ArgumentNullException ( "PipePath" ) ;
70
70
71
71
this . PipePath = PipePath ;
72
72
this . PipeArguments = PipeArguments ;
73
+ this . PipeCommandArguments = PipeCommandArguments ;
73
74
}
74
75
75
76
static internal PipeLaunchOptions CreateFromXml ( Xml . LaunchOptions . PipeLaunchOptions source )
76
77
{
77
- var options = new PipeLaunchOptions ( RequireAttribute ( source . PipePath , "PipePath" ) , source . PipeArguments ) ;
78
+ var options = new PipeLaunchOptions ( RequireAttribute ( source . PipePath , "PipePath" ) , source . PipeArguments , source . PipeCommandArguments ) ;
78
79
options . InitializeCommonOptions ( source ) ;
79
80
80
81
return options ;
@@ -88,7 +89,13 @@ static internal PipeLaunchOptions CreateFromXml(Xml.LaunchOptions.PipeLaunchOpti
88
89
/// <summary>
89
90
/// [Optional] Arguments to pass to the pipe executable.
90
91
/// </summary>
92
+ ///
91
93
public string PipeArguments { get ; private set ; }
94
+
95
+ /// <summary>
96
+ /// [Optional] Arguments to pass to the PipePath program that include a format specifier ('{0}') for a custom command.
97
+ /// </summary>
98
+ public string PipeCommandArguments { get ; private set ; }
92
99
}
93
100
94
101
public sealed class TcpLaunchOptions : LaunchOptions
@@ -282,24 +289,6 @@ private static string ResolveFromPath(string command)
282
289
/// </summary>
283
290
public string MIDebuggerServerAddress { get ; private set ; }
284
291
285
- /// <summary>
286
- /// [Required] Path to the executable file. This path must exist on the Visual Studio computer.
287
- /// </summary>
288
- public override string ExePath
289
- {
290
- get
291
- {
292
- return base . ExePath ;
293
- }
294
- set
295
- {
296
- if ( String . IsNullOrEmpty ( value ) || ! LocalLaunchOptions . CheckPath ( value ) )
297
- throw new ArgumentException ( string . Format ( CultureInfo . CurrentCulture , MICoreResources . Error_InvalidLocalExePath , value ) ) ;
298
-
299
- base . ExePath = value ;
300
- }
301
- }
302
-
303
292
/// <summary>
304
293
/// [Optional] List of environment variables to add to the launched process
305
294
/// </summary>
@@ -397,12 +386,24 @@ public abstract class LaunchOptions
397
386
398
387
public MIMode DebuggerMIMode { get ; set ; }
399
388
400
- private string _exePath ;
401
-
389
+ private Xml . LaunchOptions . BaseLaunchOptions _baseOptions ;
402
390
/// <summary>
403
391
/// Hold on to options in serializable form to support child process debugging
404
392
/// </summary>
405
- public Xml . LaunchOptions . BaseLaunchOptions BaseOptions { get ; set ; }
393
+ public Xml . LaunchOptions . BaseLaunchOptions BaseOptions
394
+ {
395
+ get { return _baseOptions ; }
396
+ protected set
397
+ {
398
+ if ( value == null )
399
+ throw new ArgumentNullException ( "BaseOptions" ) ;
400
+ VerifyCanModifyProperty ( "BaseOptions" ) ;
401
+
402
+ _baseOptions = value ;
403
+ }
404
+ }
405
+
406
+ private string _exePath ;
406
407
407
408
/// <summary>
408
409
/// [Required] Path to the executable file. This could be a path on the remote machine (for Pipe transport)
@@ -435,10 +436,20 @@ public string ExeArguments
435
436
}
436
437
}
437
438
439
+ private int _processId ;
440
+
438
441
/// <summary>
439
442
/// [Optional] If supplied, the debugger will attach to the process rather than launching a new one. Note that some operating systems will require admin rights to do this.
440
443
/// </summary>
441
- public int ProcessId { get ; set ; }
444
+ public int ProcessId
445
+ {
446
+ get { return _processId ; }
447
+ protected set
448
+ {
449
+ VerifyCanModifyProperty ( "ProcessId" ) ;
450
+ _processId = value ;
451
+ }
452
+ }
442
453
443
454
private string _coreDumpPath ;
444
455
/// <summary>
@@ -450,8 +461,10 @@ public string CoreDumpPath
450
461
{
451
462
return _coreDumpPath ;
452
463
}
453
- set
464
+ protected set
454
465
{
466
+ VerifyCanModifyProperty ( "CoreDumpPath" ) ;
467
+
455
468
// CoreDumpPath is allowed to be null/empty
456
469
_coreDumpPath = value ;
457
470
}
@@ -615,30 +628,40 @@ public LaunchCompleteCommand LaunchCompleteCommand
615
628
}
616
629
}
617
630
618
- public bool DebugChildProcesses { get ; set ; }
631
+ private bool _debugChildProcesses ;
632
+
633
+ public bool DebugChildProcesses
634
+ {
635
+ get { return _debugChildProcesses ; }
636
+ protected set
637
+ {
638
+ VerifyCanModifyProperty ( "DebugChildProcesses" ) ;
639
+ _debugChildProcesses = value ;
640
+ }
641
+ }
619
642
620
- public static string GetOptionsString ( object o )
643
+ public string GetOptionsString ( )
621
644
{
622
645
try
623
646
{
624
647
var strWriter = new StringWriter ( CultureInfo . InvariantCulture ) ;
625
648
XmlSerializer serializer ;
626
649
using ( XmlWriter writer = XmlWriter . Create ( strWriter ) )
627
650
{
628
- if ( o is Xml . LaunchOptions . LocalLaunchOptions )
651
+ if ( BaseOptions is Xml . LaunchOptions . LocalLaunchOptions )
629
652
{
630
653
serializer = new XmlSerializer ( typeof ( Xml . LaunchOptions . LocalLaunchOptions ) ) ;
631
- Serialize ( serializer , writer , o ) ;
654
+ Serialize ( serializer , writer , BaseOptions ) ;
632
655
}
633
- else if ( o is Xml . LaunchOptions . PipeLaunchOptions )
656
+ else if ( BaseOptions is Xml . LaunchOptions . PipeLaunchOptions )
634
657
{
635
658
serializer = new XmlSerializer ( typeof ( Xml . LaunchOptions . PipeLaunchOptions ) ) ;
636
- Serialize ( serializer , writer , o ) ;
659
+ Serialize ( serializer , writer , BaseOptions ) ;
637
660
}
638
- else if ( o is Xml . LaunchOptions . TcpLaunchOptions )
661
+ else if ( BaseOptions is Xml . LaunchOptions . TcpLaunchOptions )
639
662
{
640
663
serializer = new XmlSerializer ( typeof ( Xml . LaunchOptions . TcpLaunchOptions ) ) ;
641
- Serialize ( serializer , writer , o ) ;
664
+ Serialize ( serializer , writer , BaseOptions ) ;
642
665
}
643
666
else
644
667
{
@@ -835,7 +858,7 @@ public static object Deserialize(XmlSerializer serializer, XmlReader reader)
835
858
}
836
859
}
837
860
838
- public static void Serialize ( XmlSerializer serializer , XmlWriter writer , object o )
861
+ private static void Serialize ( XmlSerializer serializer , XmlWriter writer , object o )
839
862
{
840
863
try
841
864
{
@@ -950,8 +973,11 @@ protected void InitializeCommonOptions(Xml.LaunchOptions.BaseLaunchOptions sourc
950
973
else
951
974
this . AdditionalSOLibSearchPath = string . Concat ( this . AdditionalSOLibSearchPath , ";" , additionalSOLibSearchPath ) ;
952
975
}
976
+ < << << << 17d 1f 39 a11034234966c6bc4ddf9dc41d6c51d85
953
977
if ( string . IsNullOrEmpty ( this . AbsolutePrefixSOLibSearchPath ) )
954
978
this . AbsolutePrefixSOLibSearchPath = source . AbsolutePrefixSOLibSearchPath ;
979
+ = == == ==
980
+ >>> > >>> Save per- thread forking state, interrupt over the pipe rat6her than using the mi
955
981
956
982
this . ProcessId = source . ProcessId ;
957
983
this . CoreDumpPath = source . CoreDumpPath ;
0 commit comments