/// <summary> /// /// </summary> private void OnLoadScript(DebugEvent e) { // Sync up the breakpoints for this file. uint scriptIndex = e.GetScriptIndex(); DebugFrontend.Script script = debugger.GetScript(scriptIndex); string fullPath = GetLocalPath(script.name); if (fullPath != null) { m_PathMap[fullPath] = scriptIndex; } foreach (BreakPointInfo info in breakPointManager.BreakPoints) { if (info.FileFullPath == fullPath && info.Line > 0 && info.IsEnabled && !info.IsDeleted) { debugger.ToggleBreakpoint(e.GetVm(), scriptIndex, (uint)info.Line); } } // Tell the backend we're done processing this script for loading. debugger.DoneLoadingScript(e.GetVm()); }
/// <summary> /// /// </summary> private void UpdateStackUI() { m_CurrentFrame = 0; uint num = debugger.GetNumStackFrames(); if (num > 0) { StackFrameInfo[] frames = new StackFrameInfo[num]; for (uint i = 0; i < debugger.GetNumStackFrames(); i++) { DebugFrontend.StackFrame frame = debugger.GetStackFrame(i); DebugFrontend.Script script = debugger.GetScript(frame.scriptIndex); if (script != null) { frames[i].file = script.name; frames[i].available = true; } else { frames[i].file = ""; frames[i].available = false; } frames[i].function = frame.function; frames[i].line = frame.line; } PanelsHelper.stackframeUI.AddFrames(frames); } else { PanelsHelper.stackframeUI.ClearItem(); } }
public DebugFrontend.Script GetScript(uint scriptIndex) { global::System.IntPtr cPtr = DecodaPINVOKE.DebugFrontend_GetScript(swigCPtr, scriptIndex); DebugFrontend.Script ret = (cPtr == global::System.IntPtr.Zero) ? null : new DebugFrontend.Script(cPtr, false); return(ret); }