Example #1
0
 internal Breakpoint NewVariableBreakpoint(
     string variableName,
     VariableAccessMode accessMode,
     ScriptBlock action)
 {
     return(this.NewVariableBreakpoint(this._globalScriptBreakpointInfo, variableName, accessMode, action));
 }
Example #2
0
 internal Breakpoint NewVariableBreakpoint(
     string path,
     string variableName,
     VariableAccessMode accessMode,
     ScriptBlock action)
 {
     return(this.NewVariableBreakpoint(this.GetScriptBreakpointInfo(path), variableName, accessMode, action));
 }
Example #3
0
 internal VariableBreakpoint(
     ExecutionContext context,
     string script,
     string variable,
     VariableAccessMode accessMode,
     ScriptBlock action)
     : base(context, script, action, Breakpoint.BreakpointType.Variable)
 {
     this._variable   = variable;
     this._accessMode = accessMode;
 }
Example #4
0
        private Breakpoint NewVariableBreakpoint(
            ScriptBreakpointInfo breakpointInfo,
            string variableName,
            VariableAccessMode accessMode,
            ScriptBlock action)
        {
            Breakpoint breakpoint = breakpointInfo.NewVariableBreakpoint(variableName, accessMode, action);

            this._idToBreakpoint[breakpoint.Id] = breakpoint;
            this.OnBreakpointUpdated(new BreakpointUpdatedEventArgs(breakpoint, BreakpointUpdateType.Set));
            return(breakpoint);
        }
        internal Breakpoint NewVariableBreakpoint(
            string variableName,
            VariableAccessMode accessMode,
            ScriptBlock action)
        {
            ++this._numBreakpoints;
            VariableBreakpoint variableBreakpoint = new VariableBreakpoint(this._context, this._scriptPath, variableName, accessMode, action);

            if (accessMode == VariableAccessMode.Write || accessMode == VariableAccessMode.ReadWrite)
            {
                this.AddBreakpoint <string>(this._variableWriteBreakpoints, variableName, (Breakpoint)variableBreakpoint);
            }
            if (accessMode == VariableAccessMode.ReadWrite || accessMode == VariableAccessMode.Read)
            {
                this.AddBreakpoint <string>(this._variableReadBreakpoints, variableName, (Breakpoint)variableBreakpoint);
            }
            return((Breakpoint)variableBreakpoint);
        }
Example #6
0
 internal VariableBreakpoint(string script, string variable, VariableAccessMode accessMode, ScriptBlock action, int id)
     : base(script, action, id)
 {
     Variable   = variable;
     AccessMode = accessMode;
 }
Example #7
0
 public override VariableBreakpoint SetVariableBreakpoint(string variableName, VariableAccessMode accessMode = VariableAccessMode.Write, ScriptBlock action = null, string path = null) =>
 _wrappedDebugger.SetVariableBreakpoint(variableName, accessMode, action, path);
Example #8
0
 internal VariableBreakpoint(string script, string variable, VariableAccessMode accessMode, ScriptBlock action, int id)
     : base(script, action, id)
 {
     Variable = variable;
     AccessMode = accessMode;
 }
Example #9
0
 internal Breakpoint NewVariableBreakpoint(string path, string variableName, VariableAccessMode accessMode, ScriptBlock action)
 {
     return(this.AddVariableBreakpoint(new VariableBreakpoint(path, variableName, accessMode, action)));
 }
Example #10
0
 /// <summary>
 /// Creates a new instance of a <see cref="VariableBreakpoint"/>.
 /// </summary>
 public VariableBreakpoint(string script, string variable, VariableAccessMode accessMode, int id)
     : this(script, variable, accessMode, null, id)
 {
 }
Example #11
0
 /// <summary>
 /// Creates a new instance of a <see cref="VariableBreakpoint"/>.
 /// </summary>
 public VariableBreakpoint(string script, string variable, VariableAccessMode accessMode, ScriptBlock action)
     : base(script, action)
 {
     Variable   = variable;
     AccessMode = accessMode;
 }
Example #12
0
 internal Breakpoint NewVariableBreakpoint(string path, string variableName, VariableAccessMode accessMode, ScriptBlock action)
 {
     return this.AddVariableBreakpoint(new VariableBreakpoint(path, variableName, accessMode, action));
 }
Example #13
0
 internal VariableBreakpoint(string script, string variable, VariableAccessMode accessMode, ScriptBlock action) : base(script, action)
 {
     this.Variable = variable;
     this.AccessMode = accessMode;
 }
Example #14
0
 /// <summary>
 /// Sets a variable breakpoint in the debugger.
 /// </summary>
 /// <param name="variableName">The name of the variable that will trigger the breakpoint. This value may not be null.</param>
 /// <param name="accessMode">The variable access mode that will trigger the breakpoint.</param>
 /// <param name="action">The action to take when the breakpoint is hit. If null, PowerShell will break into the debugger when the breakpoint is hit.</param>
 /// <param name="path">The path to the script file where the breakpoint may be hit. If null, the breakpoint may be hit anywhere the variable is accessed using the specified access mode.</param>
 /// <param name="runspaceId">The runspace id of the runspace you want to interact with. A null value will use the current runspace.</param>
 /// <returns>The variable breakpoint that was set.</returns>
 public override VariableBreakpoint SetVariableBreakpoint(string variableName, VariableAccessMode accessMode, ScriptBlock action, string path, int?runspaceId) =>
 _wrappedDebugger.SetVariableBreakpoint(variableName, accessMode, action, path, runspaceId);
Example #15
0
 internal VariableBreakpoint(string script, string variable, VariableAccessMode accessMode, ScriptBlock action) : base(script, action)
 {
     this.Variable   = variable;
     this.AccessMode = accessMode;
 }