Ejemplo n.º 1
0
 public ScriptStackFrame(ScriptProgramNode node, string scriptName, string frame, int startLine, int endLine, int startColumn, int endColumn)
 {
     if (node == null)
     {
         throw new ArgumentNullException("node");
     }
     _node     = node;
     _debugger = node.Debugger;
     // VS is zero based, PS is 1 based
     _docContext = new ScriptDocumentContext(scriptName, frame, startLine - 1, endLine - 1, startColumn - 1, endColumn - 1);
 }
Ejemplo n.º 2
0
 public ScriptStackFrame(ScriptProgramNode node, CallStackFrame frame)
 {
     if (node == null)
     {
         throw new ArgumentNullException("node");
     }
     _node     = node;
     _debugger = node.Debugger;
     // VS is zero based, PS is 1 based
     _docContext = new ScriptDocumentContext(frame.ScriptName, frame.ScriptLineNumber - 1, 0, frame.ToString());
     _frame      = frame;
 }
        public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo)
        {
            //VS line\column is zero based. PowerShell is 1
            var documentContext = new ScriptDocumentContext(File, Line - 1, Column, "");

            Log.Debug("ScriptBreakpoint: GetResolutionInfo");
            if (dwFields == enum_BPRESI_FIELDS.BPRESI_ALLFIELDS)
            {
                var loc = new BP_RESOLUTION_LOCATION
                {
                    bpType       = (uint)enum_BP_TYPE.BPT_CODE,
                    unionmember1 = Marshal.GetComInterfaceForObject(documentContext, typeof(IDebugCodeContext2))
                };

                pBPResolutionInfo[0].bpResLocation = loc;
                pBPResolutionInfo[0].pProgram      = _node;
                pBPResolutionInfo[0].pThread       = _node;
            }

            return(VSConstants.S_OK);
        }
Ejemplo n.º 4
0
        public int GetResolutionInfo(enum_BPRESI_FIELDS dwFields, BP_RESOLUTION_INFO[] pBPResolutionInfo)
        {
            //VS line\column is zero based. PowerShell is 1
            var documentContext = new ScriptDocumentContext(File, Line - 1, Column, "");

            Log.Debug("ScriptBreakpoint: GetResolutionInfo");
            if (dwFields == enum_BPRESI_FIELDS.BPRESI_ALLFIELDS)
            {
                var loc = new BP_RESOLUTION_LOCATION
                              {
                                  bpType = (uint)enum_BP_TYPE.BPT_CODE,
                                  unionmember1 = Marshal.GetComInterfaceForObject(documentContext, typeof(IDebugCodeContext2))
                              };

                pBPResolutionInfo[0].bpResLocation = loc;
                pBPResolutionInfo[0].pProgram = _node;
                pBPResolutionInfo[0].pThread = _node;
            }

            return VSConstants.S_OK;
        }