• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Client.BreakEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Mono.Debugging.Client.BreakEvent的典型用法代码示例。如果您正苦于以下问题:C# BreakEvent类的具体用法?C# BreakEvent怎么用?C# BreakEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BreakEvent类属于Mono.Debugging.Client命名空间,在下文中一共展示了BreakEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CopyFrom

		public override void CopyFrom (BreakEvent ev)
		{
			base.CopyFrom (ev);
			
			FunctionBreakpoint bp = (FunctionBreakpoint) ev;
			FunctionName = bp.FunctionName;
		}
开发者ID:nieve,项目名称:monodevelop,代码行数:7,代码来源:FunctionBreakpoint.cs


示例2: CopyFrom

		public override void CopyFrom (BreakEvent ev)
		{
			base.CopyFrom (ev);
			Catchpoint cp = (Catchpoint) ev;
			exceptionName = cp.exceptionName;
			includeSubclasses = cp.includeSubclasses;
		}
开发者ID:0xb1dd1e,项目名称:debugger-libs,代码行数:7,代码来源:Catchpoint.cs


示例3: AttachSession

		internal void AttachSession (DebuggerSession s, BreakEvent ev)
		{
			session = s;
			BreakEvent = ev;
			session.NotifyBreakEventStatusChanged (BreakEvent);
			if (adjustedLine != -1)
				session.AdjustBreakpointLocation ((Breakpoint)BreakEvent, adjustedLine);
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:8,代码来源:BreakEventInfo.cs


示例4: CopyFrom

		public override void CopyFrom (BreakEvent ev)
		{
			base.CopyFrom (ev);
			
			Breakpoint bp = (Breakpoint) ev;
			
			breakIfConditionChanges = bp.breakIfConditionChanges;
			conditionExpression = bp.conditionExpression;
			fileName = bp.fileName;
			column = bp.column;
			line = bp.line;
		}
开发者ID:netmarti,项目名称:monodevelop,代码行数:12,代码来源:Breakpoint.cs


示例5: OnInsertBreakEvent

		protected override object OnInsertBreakEvent (BreakEvent be, bool activate)
		{
			lock (documents) {
				Breakpoint bp = be as Breakpoint;
				if (bp != null) {
					DocInfo doc;
					if (!documents.TryGetValue (System.IO.Path.GetFullPath (bp.FileName), out doc))
						return null;

					int line;
                    try {
                        line = doc.Document.FindClosestLine(bp.Line);
                    }
                    catch {
                        // Invalid line
                        return null;
                    }
					ISymbolMethod met = doc.Reader.GetMethodFromDocumentPosition (doc.Document, line, 0);
					if (met == null)
						return null;

					int offset = -1;
					foreach (SequencePoint sp in met.GetSequencePoints ()) {
						if (sp.Line == line && sp.Document.URL == doc.Document.URL) {
							offset = sp.Offset;
							break;
						}
					}
					if (offset == -1)
						return null;

					CorFunction func = doc.Module.GetFunctionFromToken (met.Token.GetToken ());
					CorFunctionBreakpoint corBp = func.ILCode.CreateBreakpoint (offset);
					corBp.Activate (activate);
					return corBp;
				}
			}
			return null;
		}
开发者ID:nickname100,项目名称:monodevelop,代码行数:39,代码来源:CorDebuggerSession.cs


示例6: GetBreakInfo

		BreakInfo GetBreakInfo (BreakEvent be)
		{
			object bi;
			if (GetBreakpointHandle (be, out bi))
				return (BreakInfo) bi;
			else
				return null;
		}
开发者ID:trustme,项目名称:monodevelop,代码行数:8,代码来源:SoftDebuggerSession.cs


示例7: BreakpointPropertiesDialog

		public BreakpointPropertiesDialog (BreakEvent be, BreakpointType breakpointType)
		{
			this.be = be;
			LoadExceptionList ();
			Initialize ();
			SetInitialData ();
			SetLayout ();
			if (be == null) {
				switch (breakpointType) {
				case BreakpointType.Location:
					stopOnLocation.Active = true;
					entryLocationFile.SetFocus ();
					break;
				case BreakpointType.Function:
					stopOnFunction.Active = true;
					entryFunctionName.SetFocus ();
					break;
				case BreakpointType.Catchpoint:
					stopOnException.Active = true;
					entryExceptionType.SetFocus ();
					break;
				}
			}
		}
开发者ID:riverans,项目名称:monodevelop,代码行数:24,代码来源:BreakpointPropertiesDialog.cs


示例8: UpdateBreakEvent

		void UpdateBreakEvent (BreakEvent be)
		{
			lock (breakpoints) {
				BreakEventInfo binfo;
				if (breakpoints.TryGetValue (be, out binfo))
					OnUpdateBreakEvent (binfo);
			}
		}
开发者ID:kmarecki,项目名称:monodevelop,代码行数:8,代码来源:DebuggerSession.cs


示例9: RemoveBreakEvent

		bool RemoveBreakEvent (BreakEvent be)
		{
			lock (breakpoints) {
				BreakEventInfo binfo;
				if (breakpoints.TryGetValue (be, out binfo)) {
					try {
						OnRemoveBreakEvent (binfo);
					} catch (Exception ex) {
						if (started)
							OnDebuggerOutput (false, ex.Message);
						HandleException (ex);
						return false;
					}
					breakpoints.Remove (be);
				}
				return true;
			}
		}
开发者ID:kmarecki,项目名称:monodevelop,代码行数:18,代码来源:DebuggerSession.cs


示例10: OnUpdateBreakEvent

		protected override object OnUpdateBreakEvent (object handle, BreakEvent be)
		{
			return controller.DebuggerServer.UpdateBreakEvent (handle, be);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:4,代码来源:MonoDebuggerSession.cs


示例11: OnInsertBreakEvent

		//breakpoints etc

		// returns a handle
		protected override object OnInsertBreakEvent (BreakEvent be, bool activate)
		{
			return controller.DebuggerServer.InsertBreakEvent (be, activate);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:7,代码来源:MonoDebuggerSession.cs


示例12: OnInsertBreakEvent

        protected override BreakEventInfo OnInsertBreakEvent(BreakEvent be)
        {
            LogWriter(false, "Break inserted\n");
            Breakpoint bp = be as Breakpoint;
            if (bp == null)
                throw new NotSupportedException ();

            BreakEventInfo bi = new BreakEventInfo ();

            //lock (debuggerLock) {
                LogWriter(false, "Location is " + PathHelper.CutOffClassPath(classPathes, bp.FileName) + ":" + bp.Line + '\n');
                breaks.Add (new Break (PathHelper.CutOffClassPath (classPathes, bp.FileName), bp.Line));
            //}

            //bi.Handle = TODO: add returned success value (break count etc)
            bi.SetStatus (BreakEventStatus.Bound, null);
            return bi;
        }
开发者ID:profelis,项目名称:md-haxebinding,代码行数:18,代码来源:HxcppDbgSession.cs


示例13: GetBreakpointHandle

		protected bool GetBreakpointHandle (BreakEvent be, out object handle)
		{
			BreakEventInfo binfo;
			if (!breakpoints.TryGetValue (be, out binfo)) {
				handle = null;
				return false;
			}
			handle = binfo.Handle;
			return true;
		}
开发者ID:tech-uday-mca,项目名称:monodevelop,代码行数:10,代码来源:DebuggerSession.cs


示例14: UpdateBreakEvent

		void UpdateBreakEvent (BreakEvent be)
		{
			lock (breakpoints) {
				object handle;
				if (GetBreakpointHandle (be, out handle)) {
					if (handle != null) {
						object newHandle = OnUpdateBreakEvent (handle, be);
						if (newHandle != handle && (newHandle == null || !newHandle.Equals (handle))) {
							// Update the handle if it has changed, and notify the status change
							SetBreakEventHandle (be, newHandle);
						}
						Breakpoints.NotifyStatusChanged (be);
					} else {
						// Try inserting the breakpoint again
						try {
							handle = OnInsertBreakEvent (be, be.Enabled);
							if (handle != null) {
								// This time worked
								SetBreakEventHandle (be, handle);
								Breakpoints.NotifyStatusChanged (be);
							}
						} catch (Exception ex) {
							Breakpoint bp = be as Breakpoint;
							if (bp != null)
								OnDebuggerOutput (false, "Could not set breakpoint at location '" + bp.FileName + ":" + bp.Line + " (" + ex.Message + ")\n");
							else
								OnDebuggerOutput (false, "Could not set catchpoint for exception '" + ((Catchpoint)be).ExceptionName + "' (" + ex.Message + ")\n");
							HandleException (ex);
						}
					}
				}
			}
		}
开发者ID:tech-uday-mca,项目名称:monodevelop,代码行数:33,代码来源:DebuggerSession.cs


示例15: UpdateBreakEventStatus

		void UpdateBreakEventStatus (BreakEvent be)
		{
			lock (breakpoints) {
				object handle;
				if (GetBreakpointHandle (be, out handle) && handle != null) {
					try {
						OnEnableBreakEvent (handle, be.Enabled);
					} catch (Exception ex) {
						if (started)
							OnDebuggerOutput (false, ex.Message);
						HandleException (ex);
					}
				}
			}
		}
开发者ID:tech-uday-mca,项目名称:monodevelop,代码行数:15,代码来源:DebuggerSession.cs


示例16: GetBreakEventStatusMessage

		/// <summary>
		/// Returns a status message of a breakpoint for this debugger session.
		/// </summary>
		public string GetBreakEventStatusMessage (BreakEvent be)
		{
			if (started) {
				BreakEventInfo binfo;
				lock (breakpoints) {
					if (breakpoints.TryGetValue (be, out binfo)) {
						if (binfo.StatusMessage != null)
							return binfo.StatusMessage;
						switch (binfo.Status) {
						case BreakEventStatus.BindError: return "The breakpoint could not be bound";
						case BreakEventStatus.Bound: return "";
						case BreakEventStatus.Disconnected: return "";
						case BreakEventStatus.Invalid: return "The breakpoint location is invalid. Perhaps the source line does " +
							"not contain any statements, or the source does not correspond to the current binary";
						case BreakEventStatus.NotBound: return "The breakpoint could not yet be bound to a valid location";
						}
					}
				}
			}
			return "The breakpoint will not currently be hit";
		}
开发者ID:kmarecki,项目名称:monodevelop,代码行数:24,代码来源:DebuggerSession.cs


示例17: AddBreakEvent

		void AddBreakEvent (BreakEvent be)
		{
			try {
				var eventInfo = OnInsertBreakEvent (be);
				if (eventInfo == null)
					throw new InvalidOperationException ("OnInsertBreakEvent can't return a null value. If the breakpoint can't be bound or is invalid, a BreakEventInfo with the corresponding status must be returned");
				lock (breakpoints) {
					breakpoints [be] = eventInfo;
				}
				eventInfo.AttachSession (this, be);
				
			} catch (Exception ex) {
				Breakpoint bp = be as Breakpoint;
				string msg;
				if (bp != null)
					msg = "Could not set breakpoint at location '" + bp.FileName + ":" + bp.Line + "'";
				else
					msg = "Could not set catchpoint for exception '" + ((Catchpoint)be).ExceptionName + "'";
				
				msg += " (" + ex.Message + ")";
				OnDebuggerOutput (false, msg + "\n");
				HandleException (ex);
				return;
			}
		}
开发者ID:kmarecki,项目名称:monodevelop,代码行数:25,代码来源:DebuggerSession.cs


示例18: CopyFrom

		public override void CopyFrom (BreakEvent ev)
		{
			base.CopyFrom (ev);
			
			Breakpoint bp = (Breakpoint) ev;

			fileName = bp.fileName;
			column = bp.column;
			line = bp.line;
		}
开发者ID:transformersprimeabcxyz,项目名称:debugger-libs,代码行数:10,代码来源:Breakpoint.cs


示例19: UpdateBreakEventStatus

		void UpdateBreakEventStatus (BreakEvent be)
		{
			lock (breakpoints) {
				BreakEventInfo binfo;
				if (breakpoints.TryGetValue (be, out binfo)) {
					try {
						OnEnableBreakEvent (binfo, be.Enabled);
					} catch (Exception ex) {
						if (started)
							OnDebuggerOutput (false, ex.Message);
						HandleException (ex);
					}
				}
			}
		}
开发者ID:kmarecki,项目名称:monodevelop,代码行数:15,代码来源:DebuggerSession.cs


示例20: OnInsertBreakEvent

		protected override BreakEventInfo OnInsertBreakEvent (BreakEvent be)
		{
			BreakEventInfo binfo = new BreakEventInfo ();

			lock (documents) {
				Breakpoint bp = be as Breakpoint;
				if (bp != null) {
					if (bp is FunctionBreakpoint) {
						// FIXME: implement breaking on function name
						binfo.SetStatus (BreakEventStatus.Invalid, null);
						return binfo;
					} else {
						DocInfo doc;
						if (!documents.TryGetValue (System.IO.Path.GetFullPath (bp.FileName), out doc)) {
							binfo.SetStatus (BreakEventStatus.NotBound, null);
							return binfo;
						}
						
						int line;
						try {
							line = doc.Document.FindClosestLine(bp.Line);
						}
						catch {
							// Invalid line
							binfo.SetStatus (BreakEventStatus.Invalid, null);
							return binfo;
						}
						ISymbolMethod met = doc.Reader.GetMethodFromDocumentPosition (doc.Document, line, 0);
						if (met == null) {
							binfo.SetStatus (BreakEventStatus.Invalid, null);
							return binfo;
						}
						
						int offset = -1;
						foreach (SequencePoint sp in met.GetSequencePoints ()) {
							if (sp.Line == line && sp.Document.URL == doc.Document.URL) {
								offset = sp.Offset;
								break;
							}
						}
						if (offset == -1) {
							binfo.SetStatus (BreakEventStatus.Invalid, null);
							return binfo;
						}
						
						CorFunction func = doc.Module.GetFunctionFromToken (met.Token.GetToken ());
						CorFunctionBreakpoint corBp = func.ILCode.CreateBreakpoint (offset);
						corBp.Activate (bp.Enabled);
						breakpoints[corBp] = binfo;
						
						binfo.Handle = corBp;
						binfo.SetStatus (BreakEventStatus.Bound, null);
						return binfo;
					}
				}
			}
			return null;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:58,代码来源:CorDebuggerSession.cs



注:本文中的Mono.Debugging.Client.BreakEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Client.BreakEventInfo类代码示例发布时间:2022-05-26
下一篇:
C# Soft.ValueImpl类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap