当前位置: 首页>>代码示例>>C#>>正文


C# Runners.DebugRunner类代码示例

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


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

示例1: Setup

 public override void Setup()
 {
     // Specify some of the requirements of IDE.
     fsr = new DebugRunner(core);
     DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
     CLRModuleType.ClearTypes();
 }
开发者ID:ankushraizada,项目名称:Dynamo,代码行数:7,代码来源:ReplicatorTest.cs

示例2: Setup

 public override void Setup()
 {
     base.Setup();
     runner = new DebugRunner(core);
     DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
     CLRModuleType.ClearTypes();
 }
开发者ID:norbertzsiros,项目名称:Dynamo,代码行数:7,代码来源:EventTest.cs

示例3: Setup

 public override void Setup()
 {
     base.Setup();
     runnerConfig = new ProtoScript.Config.RunConfiguration();
     runnerConfig.IsParrallel = false;
     fsr = new ProtoScript.Runners.DebugRunner(core);
 }
开发者ID:xconverge,项目名称:Dynamo,代码行数:7,代码来源:Debugger.cs

示例4: TestCyclicPointer01

        public void TestCyclicPointer01()
        {
            var core = thisTest.GetTestCore();
            DebugRunner fsr = new DebugRunner(core);
            // Execute and verify the main script in a debug session
            fsr.PreStart(
            @"
class Obj
{
    x : var;
    constructor Obj()
    {
        x = null;
    }
}

p = Obj.Obj();
p.x = p;        // Assign the member x to its own 'this' pointer. This creates a cycle
m = p.x;

            ");

            DebugRunner.VMState vms = fsr.StepOver();
            vms = fsr.StepOver();
            vms = fsr.StepOver();

            // Test the heap contains a cycle
            var runtimeCore = fsr.runtimeCore;
            Assert.IsTrue(runtimeCore.Heap.IsHeapCyclic());

        }
开发者ID:qingemeng,项目名称:Dynamo,代码行数:31,代码来源:HeapCorruptionTests.cs

示例5: Setup

 public override void Setup()
 {
     // Specify some of the requirements of IDE.
     runnerConfig = new ProtoScript.Config.RunConfiguration();
     runnerConfig.IsParrallel = false;
     fsr = new DebugRunner(core);
     DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
     CLRModuleType.ClearTypes();
 }
开发者ID:rafatahmed,项目名称:Dynamo,代码行数:9,代码来源:ReplicatorTest.cs

示例6: Setup

 public override void Setup()
 {
     base.Setup();
     runconfig = new ProtoScript.Config.RunConfiguration();
     runconfig.IsParrallel = false;
     runner = new DebugRunner(core);
     DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
     CLRModuleType.ClearTypes();
 }
开发者ID:rafatahmed,项目名称:Dynamo,代码行数:9,代码来源:EventTest.cs

示例7: Setup

        public override void Setup()
        {
            base.Setup();
            core.Options.kDynamicCycleThreshold = 5;

            fsr = new DebugRunner(core);

            DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
            CLRModuleType.ClearTypes();
        }
开发者ID:norbertzsiros,项目名称:Dynamo,代码行数:10,代码来源:BasicTests.cs

示例8: SetUp

 public void SetUp()
 {
     // Specify some of the requirements of IDE.
     ProtoCore.Options options = new ProtoCore.Options();
     options.ExecutionMode = ProtoCore.ExecutionMode.Serial;
     options.SuppressBuildOutput = false;
     core = new ProtoCore.Core(options);
     core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
     core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
     runnerConfig = new ProtoScript.Config.RunConfiguration();
     runnerConfig.IsParrallel = false;
     fsr = new ProtoScript.Runners.DebugRunner(core);
 }
开发者ID:khoaho,项目名称:Dynamo,代码行数:13,代码来源:Debugger.cs

示例9: Setup

 public void Setup()
 {
     var options = new ProtoCore.Options();
     options.ExecutionMode = ProtoCore.ExecutionMode.Serial;
     options.SuppressBuildOutput = false;
     core_ = new ProtoCore.Core(options);
     core_.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core_));
     core_.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core_));
     runconfig_ = new ProtoScript.Config.RunConfiguration();
     runconfig_.IsParrallel = false;
     runner_ = new DebugRunner(core_);
     DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
     CLRModuleType.ClearTypes();
 }
开发者ID:algobasket,项目名称:Dynamo,代码行数:14,代码来源:EventTest.cs

示例10: Setup

 public void Setup()
 {
     // Specify some of the requirements of IDE.
     var options = new ProtoCore.Options();
     options.ExecutionMode = ProtoCore.ExecutionMode.Serial;
     options.SuppressBuildOutput = false;
     core = new ProtoCore.Core(options);
     core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
     core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));
     runnerConfig = new ProtoScript.Config.RunConfiguration();
     runnerConfig.IsParrallel = false;
     fsr = new DebugRunner(core);
     DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
     CLRModuleType.ClearTypes();
 }
开发者ID:RobertiF,项目名称:Dynamo,代码行数:15,代码来源:SetValueTests.cs

示例11: Setup

        public void Setup()
        {
            // Specify some of the requirements of IDE.
            var options = new ProtoCore.Options();
            options.ExecutionMode = ProtoCore.ExecutionMode.Serial;

            core = new ProtoCore.Core(options);
            core.Compilers.Add(ProtoCore.Language.Associative, new ProtoAssociative.Compiler(core));
            core.Compilers.Add(ProtoCore.Language.Imperative, new ProtoImperative.Compiler(core));

            fsr = new DebugRunner(core);

            DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
            CLRModuleType.ClearTypes();
        }
开发者ID:ksobon,项目名称:Dynamo,代码行数:15,代码来源:BasicTests.cs

示例12: DebugRunnerStepOver

        internal static ProtoCore.Core DebugRunnerStepOver(string code)
        {
            //Internal setup

            ProtoCore.Core core;
            DebugRunner fsr;
            ProtoScript.Config.RunConfiguration runnerConfig;
            string testPath = @"..\..\..\Scripts\Debugger\";

             // Specify some of the requirements of IDE.
            var options = new ProtoCore.Options();
            options.ExecutionMode = ProtoCore.ExecutionMode.Serial;
            options.SuppressBuildOutput = false;

            core = new ProtoCore.Core(options);
            core.Executives.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Executive(core));
            core.Executives.Add(ProtoCore.Language.kImperative, new ProtoImperative.Executive(core));

            runnerConfig = new ProtoScript.Config.RunConfiguration();
            runnerConfig.IsParrallel = false;
            fsr = new DebugRunner(core);

            DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
            CLRModuleType.ClearTypes();

            //Run

            fsr.PreStart(code, runnerConfig);
            DebugRunner.VMState vms = null;

            while (!fsr.isEnded)
                vms = fsr.StepOver();

            return core;
        }
开发者ID:Benglin,项目名称:designscript,代码行数:35,代码来源:DebugTestFx.cs

示例13: DebugRunnerStepIn

        internal static void DebugRunnerStepIn(string includePath, string code, /*string logFile*/Dictionary<int, List<string>> map, 
            bool watchNestedMode = false, string defectID = "")
        {
            //Internal setup
            ProtoCore.Core core;
            DebugRunner fsr;
            
            // Specify some of the requirements of IDE.
            var options = new ProtoCore.Options();
            options.ExecutionMode = ProtoCore.ExecutionMode.Serial;
            options.SuppressBuildOutput = false;
            options.GCTempVarsOnDebug = false;
            
            // Cyclic dependency threshold is lowered from the default (2000)
            // as this causes the test framework to be painfully slow
            options.kDynamicCycleThreshold = 5;

            // Pass the absolute path so that imported filepaths can be resolved
            // in "FileUtils.GetDSFullPathName()"
            if (!String.IsNullOrEmpty(includePath))
            {
                includePath = Path.GetDirectoryName(includePath);
                options.IncludeDirectories.Add(includePath);
            }
            
            
            core = new ProtoCore.Core(options);


            core.Compilers.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Compiler(core));
            core.Compilers.Add(ProtoCore.Language.kImperative, new ProtoImperative.Compiler(core));

            fsr = new DebugRunner(core);

            DLLFFIHandler.Register(FFILanguage.CSharp, new CSModuleHelper());
            
            //Run
            fsr.PreStart(code);


            RuntimeCore runtimeCore = fsr.runtimeCore;

            //StreamReader log = new StreamReader(logFile);

            //bool isPrevBreakAtPop = false;
            int lineAtPrevBreak = -1;
            string symbolName = null;
            DebugRunner.VMState vms = null;

            while (!fsr.isEnded)
            {
                vms = fsr.LastState;

                OpCode opCode = OpCode.NONE;
                DebugInfo debug = null;
                if (vms != null)
                {
                    // check if previous break is a POP
                    // if so, get the line no. and LHS
                    opCode = fsr.CurrentInstruction.opCode;
                    debug = fsr.CurrentInstruction.debug;

                    if (opCode == ProtoCore.DSASM.OpCode.POP)
                    {
                        //isPrevBreakAtPop = true;
                        lineAtPrevBreak = vms.ExecutionCursor.StartInclusive.LineNo;                       
                    }
                }

                DebugRunner.VMState currentVms = fsr.Step();

                //if (isPrevBreakAtPop)

                if (debug != null)
                {
                    // Do not do the verification for imported DS files, for which the FilePath is non null
                    if (debug.Location.StartInclusive.SourceLocation.FilePath == null)
                    {
                        if (opCode == ProtoCore.DSASM.OpCode.POP)
                        {
                            VerifyWatch_Run(lineAtPrevBreak, runtimeCore.DebugProps.CurrentSymbolName, core, runtimeCore, map, watchNestedMode, defectID: defectID);
                        }
                        // if previous breakpoint was at a CALLR
                        else if (opCode == ProtoCore.DSASM.OpCode.CALLR)
                        {
                            if (runtimeCore.DebugProps.IsPopmCall)
                            {
                                int ci = (int)currentVms.mirror.MirrorTarget.rmem.GetAtRelative(ProtoCore.DSASM.StackFrame.kFrameIndexClass).opdata;
                                VerifyWatch_Run(InjectionExecutive.callrLineNo, runtimeCore.DebugProps.CurrentSymbolName, core, runtimeCore, map, watchNestedMode, ci, defectID);
                            }
                        }
                    }
                }
                //isPrevBreakAtPop = false;
            }
            runtimeCore.Cleanup();
        }
开发者ID:norbertzsiros,项目名称:Dynamo,代码行数:97,代码来源:WatchTestFx.cs

示例14: Setup

 public override void Setup()
 {
     base.Setup();
     fsr = new ProtoScript.Runners.DebugRunner(core);
 }
开发者ID:ankushraizada,项目名称:Dynamo,代码行数:5,代码来源:Debugger.cs

示例15: CleanUpRunners

        private void CleanUpRunners()
        {
            Logger.LogInfo("DetachFromDebugger", "Detach");

            // Clear up all watch related data members.
            this.workerParams.CurrentVmState = null;
            this.currentWatchedMirror = null;
            this.currentWatchedStackValue = null;

            if (null != scriptRunner)
                scriptRunner = null;

            if (null != debugRunner)
            {
                debugRunner.Shutdown();
                debugRunner = null;
            }

            if (null != internalWorker)
            {
                // @TODO(Ben): Perhaps cancellation is needed?
                internalWorker = null;
            }

            //Fix DG-1464973 Sprint25: rev 3444 : Multiple import issue - dispose core after execution
            //Core Cleanup should happen only after execution has finished,
            //DebugRunner is ShutDown.
            if (null != this.core)
            {
                this.core.Cleanup();
                this.core = null;
            }

            workerParams.ResetStates();
            SetExecutionState(ExecutionStateChangedEventArgs.States.None);
        }
开发者ID:seasailor,项目名称:designscript,代码行数:36,代码来源:VirtualMachineWorker.cs


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