當前位置: 首頁>>代碼示例>>C#>>正文


C# Client.DebuggerSession類代碼示例

本文整理匯總了C#中Mono.Debugging.Client.DebuggerSession的典型用法代碼示例。如果您正苦於以下問題:C# DebuggerSession類的具體用法?C# DebuggerSession怎麽用?C# DebuggerSession使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DebuggerSession類屬於Mono.Debugging.Client命名空間,在下文中一共展示了DebuggerSession類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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

示例2: Attach

		internal void Attach (DebuggerSession session)
		{
			this.session = session;
			if (frames != null) {
				foreach (StackFrame f in frames)
					f.Attach (session);
			}
		}
開發者ID:segaman,項目名稱:monodevelop,代碼行數:8,代碼來源:Backtrace.cs

示例3: Attach

		internal void Attach (DebuggerSession session)
		{
			this.session = session;
			if (currentThreads != null) {
				foreach (ThreadInfo t in currentThreads)
					t.Attach (session);
			}
		}
開發者ID:0xb1dd1e,項目名稱:debugger-libs,代碼行數:8,代碼來源:ProcessInfo.cs

示例4: DebugAsyncOperation

		public DebugAsyncOperation (DebuggerSession session)
		{
			this.session = session;
			taskSource = new TaskCompletionSource<int> ();
			DebuggingService.StoppedEvent += OnStopDebug;
			CancellationTokenSource = new CancellationTokenSource ();
			CancellationTokenSource.Token.Register (DebuggingService.Stop);
			Task = taskSource.Task;
		}
開發者ID:kdubau,項目名稱:monodevelop,代碼行數:9,代碼來源:DebugExecutionHandlerFactory.cs

示例5: Attach

		internal void Attach (DebuggerSession session)
		{
			this.session = session;
			serverBacktrace = session.WrapDebuggerObject (serverBacktrace);
			if (frames != null) {
				foreach (StackFrame f in frames) {
					f.Attach (session);
					f.SourceBacktrace = serverBacktrace;
				}
			}
		}
開發者ID:0xb1dd1e,項目名稱:debugger-libs,代碼行數:11,代碼來源:Backtrace.cs

示例6: Attach

 internal void Attach(DebuggerSession debugSession)
 {
     session = debugSession;
 }
開發者ID:peterdocter,項目名稱:debugger-libs,代碼行數:4,代碼來源:StackFrame.cs

示例7: Resolve

		string Resolve (DebuggerSession session, SourceLocation location, string exp, bool tryTypeOf)
		{
			exp = exp.TrimStart ();
			if (exp.StartsWith ("?"))
				return "?" + Resolve (session, location, exp.Substring (1).Trim ());
			if (exp.StartsWith ("var "))
				return "var " + Resolve (session, location, exp.Substring (4).Trim (' ','\t'));

			exp = ReplaceExceptionTag (exp, session.Options.EvaluationOptions.CurrentExceptionTag);

			StringReader codeStream = new StringReader (exp);
			IParser parser = ParserFactory.CreateParser (SupportedLanguage.CSharp, codeStream);
			Expression expObj = parser.ParseExpression ();
			if (expObj == null)
				return exp;
			NRefactoryResolverVisitor ev = new NRefactoryResolverVisitor (session, location, exp);
			expObj.AcceptVisitor (ev, null);
			string r = ev.GetResolvedExpression ();
			if (r == exp && !tryTypeOf && (expObj is BinaryOperatorExpression) && IsTypeName (exp)) {
				// This is a hack to be able to parse expressions such as "List<string>". The NRefactory parser
				// can parse a single type name, so a solution is to wrap it around a typeof(). We do it if
				// the evaluation fails.
				string res = Resolve (session, location, "typeof(" + exp + ")", true);
				return res.Substring (7, res.Length - 8);
			}
			return r;
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:27,代碼來源:NRefactoryEvaluator.cs

示例8: NRefactoryExpressionResolverVisitor

 public NRefactoryExpressionResolverVisitor(DebuggerSession session, SourceLocation location, string expression)
 {
     this.expression = expression.Replace ("\n", "").Replace ("\r", "");
     this.session = session;
     this.location = location;
 }
開發者ID:0xb1dd1e,項目名稱:debugger-libs,代碼行數:6,代碼來源:NRefactoryExpressionResolverVisitor.cs

示例9: AppendThreads

		void AppendThreads (TreeIter iter, ProcessInfo process, DebuggerSession session)
		{
			var threads = process.GetThreads ();

			Array.Sort (threads, (ThreadInfo t1, ThreadInfo t2) => t1.Id.CompareTo (t2.Id));

			session.FetchFrames (threads);

			var activeThread = session.ActiveThread;
			foreach (var thread in threads) {
				var name = thread.Name == null && thread.Id == 1 ? GettextCatalog.GetString ("Main Thread") : thread.Name;
				var weight = thread == activeThread ? Pango.Weight.Bold : Pango.Weight.Normal;
				var icon = thread == activeThread ? Gtk.Stock.GoForward : null;

				if (iter.Equals (TreeIter.Zero))
					store.AppendValues (icon, thread.Id.ToString (), name, thread, (int)weight, thread.Location, session);
				else
					store.AppendValues (iter, icon, thread.Id.ToString (), name, thread, (int)weight, thread.Location, session);
			}
		}
開發者ID:kdubau,項目名稱:monodevelop,代碼行數:20,代碼來源:ThreadsPad.cs

示例10: Cleanup

		static void Cleanup ()
		{
			currentBacktrace = null;
			
			if (!IsDebugging)
				return;

			if (busyStatusIcon != null) {
				busyStatusIcon.Dispose ();
				busyStatusIcon = null;
			}
			
			session.TargetEvent -= OnTargetEvent;
			session.TargetStarted -= OnStarted;
			session.OutputWriter = null;
			session.LogWriter = null;
			session.ExceptionHandler = null;
			session.BusyStateChanged -= OnBusyStateChanged;
			session.TypeResolverHandler = null;
			session.BreakpointTraceHandler = null;
			session.GetExpressionEvaluator = null;
			console.CancelRequested -= OnCancelRequested;
			
			// Dispose the session at the end, since it may take a while.
			DebuggerSession oldSession = session;
			session = null;

			if (StoppedEvent != null)
				StoppedEvent (null, new EventArgs ());
			
			if (console != null) {
				console.Dispose ();
				console = null;
			}
			
			DispatchService.GuiDispatch (delegate {
				NotifyCallStackChanged ();
				NotifyCurrentFrameChanged ();
				NotifyLocationChanged ();
			});
			
			if (oldSession != null) {
				oldSession.BusyStateChanged -= OnBusyStateChanged;
				oldSession.Dispose ();
			}
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:46,代碼來源:DebuggingService.cs

示例11: InternalDebuggerSession

		public InternalDebuggerSession (DebuggerSession session)
		{
			this.session = session;
		}
開發者ID:kmarecki,項目名稱:monodevelop,代碼行數:4,代碼來源:DebuggerSession.cs

示例12:

 void IRawObject.Connect(DebuggerSession session, EvaluationOptions options)
 {
     source = session.WrapDebuggerObject (source);
 }
開發者ID:0xb1dd1e,項目名稱:debugger-libs,代碼行數:4,代碼來源:RawValue.cs

示例13: FillWithSource

		public void FillWithSource ()
		{
			cachedLines.Clear ();
			
			StackFrame sf = DebuggingService.CurrentFrame;
			session = sf.DebuggerSession;
			if (currentFile != sf.SourceLocation.FileName) {
				AssemblyLine[] asmLines = sf.DebuggerSession.DisassembleFile (sf.SourceLocation.FileName);
				if (asmLines == null) {
					// Mixed disassemble not supported
					Fill ();
					return;
				}
				currentFile = sf.SourceLocation.FileName;
				addressLines.Clear ();
				editor.Text = string.Empty;
				using (var sr = new StreamReader (sf.SourceLocation.FileName)) {
					string line;
					int sourceLine = 1;
					int na = 0;
					int editorLine = 1;
					var sb = new StringBuilder ();
					var asmLineNums = new List<int> ();
					while ((line = sr.ReadLine ()) != null) {
						InsertSourceLine (sb, editorLine++, line);
						while (na < asmLines.Length && asmLines [na].SourceLine == sourceLine) {
							asmLineNums.Add (editorLine);
							InsertAssemblerLine (sb, editorLine++, asmLines [na++]);
						}
						sourceLine++;
					}
					editor.Text = sb.ToString ();
					foreach (int li in asmLineNums)
						editor.AddMarker (li, asmMarker);
				}
			}
			int aline;
			if (!addressLines.TryGetValue (GetAddrId (sf.Address, sf.AddressSpace), out aline))
				return;
			UpdateCurrentLineMarker (true);
		}
開發者ID:kdubau,項目名稱:monodevelop,代碼行數:41,代碼來源:DisassemblyView.cs

示例14: SetUp

		public override void SetUp ()
		{
			base.SetUp ();
			ds = Start ("TestEvaluation");
			if (ds == null)
				Assert.Ignore ("Engine not found: {0}", EngineId);

			frame = ds.ActiveThread.Backtrace.GetFrame (0);
		}
開發者ID:telebovich,項目名稱:monodevelop,代碼行數:9,代碼來源:EvaluationTests.cs

示例15: Cleanup

		public void Cleanup ()
		{
			if (taskSource != null) {
				taskSource.SetResult (0);
				taskSource = null;
			}
			DebuggingService.StoppedEvent -= OnStopDebug;
			session = null;
		}
開發者ID:kdubau,項目名稱:monodevelop,代碼行數:9,代碼來源:DebugExecutionHandlerFactory.cs


注:本文中的Mono.Debugging.Client.DebuggerSession類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。