protected DbgEngineImpl(DbgEngineImplDependencies deps, DbgManager dbgManager, DbgStartKind startKind) { if (deps == null) { throw new ArgumentNullException(nameof(deps)); } StartKind = startKind; lockObj = new object(); toEngineAppDomain = new Dictionary <DnAppDomain, DbgEngineAppDomain>(); toEngineModule = new Dictionary <CorModule, DbgEngineModule>(); toEngineThread = new Dictionary <DnThread, DbgEngineThread>(); toAssemblyModules = new Dictionary <DnAssembly, List <DnModule> >(); stackFrameData = new StackFrameData(); objectHolders = new HashSet <DnDebuggerObjectHolder>(); debuggerSettings = deps.DebuggerSettings; dbgDotNetCodeRangeService = deps.DotNetCodeRangeService; dbgDotNetNativeCodeLocationFactory = deps.DbgDotNetNativeCodeLocationFactory; dbgDotNetCodeLocationFactory = deps.DbgDotNetCodeLocationFactory; this.dbgManager = dbgManager ?? throw new ArgumentNullException(nameof(dbgManager)); dbgModuleMemoryRefreshedNotifier = deps.DbgModuleMemoryRefreshedNotifier; clrDacProvider = deps.ClrDacProvider; clrDac = NullClrDac.Instance; debuggerThread = new DebuggerThread("CorDebug"); debuggerThread.CallDispatcherRun(); dotNetValuesToCloseOnContinue = new List <DbgDotNetValueImpl>(); valuesToCloseNow = new List <DbgCorValueHolder>(); dmdRuntime = DmdRuntimeFactory.CreateRuntime(new DmdEvaluatorImpl(this), IntPtr.Size == 4 ? DmdImageFileMachine.I386 : DmdImageFileMachine.AMD64); toDynamicModuleHelper = new Dictionary <CorModule, DmdDynamicModuleHelperImpl>(); DmdDispatcher = new DmdDispatcherImpl(this); RawMetadataService = deps.RawMetadataService; }
public override void Load(ILSpySettings settings) { var s = DebuggerSettings.Instance; s.Load(settings); this.settings = s; }
public ActionResult Compile(string source) { //Use settings from the My Documents folder, in a hosted / multi-tenant environment, this will have to change. This works for local machine for now var settings = new DebuggerSettings(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)); #if DEBUG settings.compilerPaths[SourceLanguage.CSharp] = Server.MapPath("~") + @"bin\Compilers\CSharp\"; settings.compilerPaths[SourceLanguage.Python] = Server.MapPath("~") + @"bin\Compilers\Python\"; #else settings.compilerPaths[SourceLanguage.CSharp] = Server.MapPath("~") + @"Compilers\CSharp\"; settings.compilerPaths[SourceLanguage.Python] = Server.MapPath("~") + @"Compilers\Python\"; #endif Neo.Debugger.Core.Utils.Compiler compiler = new Neo.Debugger.Core.Utils.Compiler(settings); compiler.SendToLog += Compiler_SendToLog; Directory.CreateDirectory(settings.path); var fileName = Path.Combine(settings.path, "DebugContract.cs"); bool success = compiler.CompileContract(source, fileName, Debugger.Core.Data.SourceLanguage.CSharp); if (success) { compiler.Log("Contract compiled successfully."); } return(Json(success)); }
ThreadsOperationsImpl(IThreadsVM threadsVM, DebuggerSettings debuggerSettings, Lazy <ReferenceNavigatorService> referenceNavigatorService, Lazy <DbgCallStackService> dbgCallStackService) { this.threadsVM = threadsVM; this.debuggerSettings = debuggerSettings; this.referenceNavigatorService = referenceNavigatorService; this.dbgCallStackService = dbgCallStackService; }
static void Main(string[] args) { Console.WriteLine("NEO Developer Shell - " + DebuggerUtils.DebuggerVersion); var settings = new DebuggerSettings(Directory.GetCurrentDirectory()); var shell = new DebuggerShell(settings); shell.AddCommand(new ExitCommand()); if (args.Length > 0) { shell.Execute("load " + args[0], OutputMessage); } while (true) { Console.Write(">"); var input = Console.ReadLine(); if (string.IsNullOrEmpty(input)) { continue; } if (!shell.Execute(input, OutputMessage)) { Console.WriteLine("Unknown command. Type HELP for list of commands."); } } }
DbgMetadataServiceImpl(DbgModuleIdProviderService dbgModuleIdProviderService, DbgInMemoryModuleService dbgInMemoryModuleService, DsDocumentProvider dsDocumentProvider, IDsDocumentService documentService, DebuggerSettings debuggerSettings) { this.dbgModuleIdProviderService = dbgModuleIdProviderService; this.dbgInMemoryModuleService = dbgInMemoryModuleService; this.dsDocumentProvider = dsDocumentProvider; this.documentService = documentService; this.debuggerSettings = debuggerSettings; }
DbgEngineImplDependencies(DebuggerSettings debuggerSettings, Lazy <DbgDotNetCodeLocationFactory> dbgDotNetCodeLocationFactory, DbgModuleMemoryRefreshedNotifier2 dbgModuleMemoryRefreshedNotifier, DbgRawMetadataService rawMetadataService, DbgEngineStepperFactory dbgEngineStepperFactory) { DebuggerSettings = debuggerSettings; DbgDotNetCodeLocationFactory = dbgDotNetCodeLocationFactory; DbgModuleMemoryRefreshedNotifier = dbgModuleMemoryRefreshedNotifier; RawMetadataService = rawMetadataService; EngineStepperFactory = dbgEngineStepperFactory; }
ModulesOperationsImpl(IModulesVM modulesVM, DebuggerSettings debuggerSettings, Lazy <ModulesSaver> modulesSaver, Lazy <MemoryWindowService> memoryWindowService, Lazy <ReferenceNavigatorService> referenceNavigatorService, Lazy <IModuleLoader> moduleLoader) { this.modulesVM = modulesVM; this.debuggerSettings = debuggerSettings; this.modulesSaver = modulesSaver; this.memoryWindowService = memoryWindowService; this.referenceNavigatorService = referenceNavigatorService; this.moduleLoader = moduleLoader; }
public static DebuggerSettings LoadDebuggerSettings(ILSpySettings settings) { XElement e = settings[DEBUGGER_SETTINGS]; DebuggerSettings s = new DebuggerSettings(); s.ShowWarnings = (bool?)e.Attribute(SHOW_WARNINGS) ?? s.ShowWarnings; s.AskForArguments = (bool?)e.Attribute(ASK_ARGUMENTS) ?? s.AskForArguments; return(s); }
ModuleBreakpointsOperationsImpl(IModuleBreakpointsVM moduleBreakpointsVM, DebuggerSettings debuggerSettings, Lazy <DbgModuleBreakpointsService> dbgModuleBreakpointsService, Lazy <ISettingsServiceFactory> settingsServiceFactory, IPickSaveFilename pickSaveFilename, IPickFilename pickFilename, IMessageBoxService messageBoxService) { this.moduleBreakpointsVM = moduleBreakpointsVM; this.debuggerSettings = debuggerSettings; this.dbgModuleBreakpointsService = dbgModuleBreakpointsService; this.settingsServiceFactory = settingsServiceFactory; this.pickSaveFilename = pickSaveFilename; this.pickFilename = pickFilename; this.messageBoxService = messageBoxService; }
ProcessesOperationsImpl(UIDispatcher uiDispatcher, IProcessesVM processesVM, DebuggerSettings debuggerSettings, Lazy <DbgManager> dbgManager, Lazy <ShowAttachToProcessDialog> showAttachToProcessDialog, Lazy <ReferenceNavigatorService> referenceNavigatorService, Lazy <DbgCallStackService> dbgCallStackService) { this.uiDispatcher = uiDispatcher; this.processesVM = processesVM; this.debuggerSettings = debuggerSettings; this.dbgManager = dbgManager; this.showAttachToProcessDialog = showAttachToProcessDialog; this.referenceNavigatorService = referenceNavigatorService; this.dbgCallStackService = dbgCallStackService; }
DbgEngineImplDependencies(DbgDotNetCodeRangeService dbgDotNetCodeRangeService, DebuggerSettings debuggerSettings, Lazy <DbgDotNetNativeCodeLocationFactory> dbgDotNetNativeCodeLocationFactory, Lazy <DbgDotNetCodeLocationFactory> dbgDotNetCodeLocationFactory, ClrDacProvider clrDacProvider, DbgModuleMemoryRefreshedNotifier2 dbgModuleMemoryRefreshedNotifier, DbgRawMetadataService rawMetadataService) { DotNetCodeRangeService = dbgDotNetCodeRangeService; DebuggerSettings = debuggerSettings; DbgDotNetNativeCodeLocationFactory = dbgDotNetNativeCodeLocationFactory; DbgDotNetCodeLocationFactory = dbgDotNetCodeLocationFactory; ClrDacProvider = clrDacProvider; DbgModuleMemoryRefreshedNotifier = dbgModuleMemoryRefreshedNotifier; RawMetadataService = rawMetadataService; }
VariablesWindowOperationsImpl(DebuggerSettings debuggerSettings, DbgEvalFormatterSettings dbgEvalFormatterSettings, Lazy <DbgLanguageService> dbgLanguageService, Lazy <DbgObjectIdService> dbgObjectIdService, Lazy <WatchExpressionsService> watchExpressionsService, Lazy <ToolWindows.Memory.MemoryWindowService> memoryWindowService, Lazy <IPickSaveFilename> pickSaveFilename, Lazy <IMessageBoxService> messageBoxService) { this.debuggerSettings = debuggerSettings; this.dbgEvalFormatterSettings = dbgEvalFormatterSettings; this.dbgLanguageService = dbgLanguageService; this.dbgObjectIdService = dbgObjectIdService; this.watchExpressionsService = watchExpressionsService; this.memoryWindowService = memoryWindowService; this.pickSaveFilename = pickSaveFilename; this.messageBoxService = messageBoxService; }
CallStackOperationsImpl(ICallStackVM callStackVM, DebuggerSettings debuggerSettings, CallStackDisplaySettings callStackDisplaySettings, Lazy <ReferenceNavigatorService> referenceNavigatorService, Lazy <DbgCallStackService> dbgCallStackService, Lazy <ShowCodeBreakpointSettingsService> showCodeBreakpointSettingsService, Lazy <DbgCodeBreakpointSerializerService> dbgCodeBreakpointSerializerService, Lazy <DbgCodeBreakpointsService> dbgCodeBreakpointsService, Lazy <DbgManager> dbgManager) { this.callStackVM = callStackVM; this.debuggerSettings = debuggerSettings; this.callStackDisplaySettings = callStackDisplaySettings; this.referenceNavigatorService = referenceNavigatorService; this.dbgCallStackService = dbgCallStackService; this.showCodeBreakpointSettingsService = showCodeBreakpointSettingsService; this.dbgCodeBreakpointSerializerService = dbgCodeBreakpointSerializerService; this.dbgCodeBreakpointsService = dbgCodeBreakpointsService; this.dbgManager = dbgManager; }
public DebuggerShell(DebuggerSettings settings) { this._settings = settings; this.Debugger = new DebugManager(_settings); AddCommand(new HelpCommand()); AddCommand(new LoadCommand()); AddCommand(new ContractCommand()); AddCommand(new InputCommand()); AddCommand(new StorageCommand()); }
ValueNodesVMFactoryImpl(UIDispatcher uiDispatcher, ITreeViewService treeViewService, LanguageEditValueProviderFactory languageEditValueProviderFactory, DbgValueNodeImageReferenceService dbgValueNodeImageReferenceService, DebuggerSettings debuggerSettings, DbgEvalFormatterSettings dbgEvalFormatterSettings, DbgObjectIdService dbgObjectIdService, IClassificationFormatMapService classificationFormatMapService, ITextBlockContentInfoFactory textBlockContentInfoFactory, IMenuService menuService, IWpfCommandService wpfCommandService) { uiDispatcher.VerifyAccess(); this.uiDispatcher = uiDispatcher; this.treeViewService = treeViewService; this.languageEditValueProviderFactory = languageEditValueProviderFactory; this.dbgValueNodeImageReferenceService = dbgValueNodeImageReferenceService; this.debuggerSettings = debuggerSettings; this.dbgEvalFormatterSettings = dbgEvalFormatterSettings; this.dbgObjectIdService = dbgObjectIdService; this.classificationFormatMapService = classificationFormatMapService; this.textBlockContentInfoFactory = textBlockContentInfoFactory; this.menuService = menuService; this.wpfCommandService = wpfCommandService; }
CallStackOperationsImpl(ICallStackVM callStackVM, DebuggerSettings debuggerSettings, CallStackDisplaySettings callStackDisplaySettings, IMessageBoxService messageBoxService, Lazy <ReferenceNavigatorService> referenceNavigatorService, Lazy <DbgCallStackService> dbgCallStackService, Lazy <ShowCodeBreakpointSettingsService> showCodeBreakpointSettingsService, Lazy <DbgCodeBreakpointSerializerService> dbgCodeBreakpointSerializerService, Lazy <DbgCodeBreakpointsService> dbgCodeBreakpointsService, Lazy <DbgManager> dbgManager, Lazy <DbgLanguageService> dbgLanguageService, Lazy <DbgShowNativeCodeService> dbgShowNativeCodeService) { this.callStackVM = callStackVM; this.debuggerSettings = debuggerSettings; this.callStackDisplaySettings = callStackDisplaySettings; this.messageBoxService = messageBoxService; this.referenceNavigatorService = referenceNavigatorService; this.dbgCallStackService = dbgCallStackService; this.showCodeBreakpointSettingsService = showCodeBreakpointSettingsService; this.dbgCodeBreakpointSerializerService = dbgCodeBreakpointSerializerService; this.dbgCodeBreakpointsService = dbgCodeBreakpointsService; this.dbgManager = dbgManager; this.dbgLanguageService = dbgLanguageService; this.dbgShowNativeCodeService = dbgShowNativeCodeService; }
public DebuggerShell(DebugManager debugger) { this.Debugger = debugger; this._settings = debugger.Settings; AddCommand(new HelpCommand()); AddCommand(new LoadCommand()); AddCommand(new ContractCommand()); AddCommand(new InvokeCommand()); AddCommand(new StorageCommand()); AddCommand(new BreakpointCommand()); AddCommand(new FileCommand()); AddCommand(new RunCommand()); AddCommand(new StepCommand()); }
DebuggerImpl(Lazy <IMessageBoxService> messageBoxService, Lazy <IAppWindow> appWindow, Lazy <IDocumentTabService> documentTabService, Lazy <DbgManager> dbgManager, Lazy <StartDebuggingOptionsProvider> startDebuggingOptionsProvider, Lazy <ShowAttachToProcessDialog> showAttachToProcessDialog, Lazy <TextViewBreakpointService> textViewBreakpointService, Lazy <DbgCodeBreakpointsService> dbgCodeBreakpointsService, Lazy <DbgCallStackService> dbgCallStackService, Lazy <ReferenceNavigatorService> referenceNavigatorService, Lazy <DbgTextViewCodeLocationService> dbgTextViewCodeLocationService, Lazy <DbgExceptionFormatterService> dbgExceptionFormatterService, DebuggerSettings debuggerSettings) { this.messageBoxService = messageBoxService; this.appWindow = appWindow; this.documentTabService = documentTabService; this.dbgManager = dbgManager; this.startDebuggingOptionsProvider = startDebuggingOptionsProvider; this.showAttachToProcessDialog = showAttachToProcessDialog; this.textViewBreakpointService = textViewBreakpointService; this.dbgCodeBreakpointsService = dbgCodeBreakpointsService; this.dbgCallStackService = dbgCallStackService; this.referenceNavigatorService = referenceNavigatorService; this.dbgTextViewCodeLocationService = dbgTextViewCodeLocationService; this.dbgExceptionFormatterService = dbgExceptionFormatterService; this.debuggerSettings = debuggerSettings; }
static void Main(string[] args) { Console.WriteLine("NEO Developer Shell - " + DebuggerUtils.DebuggerVersion); var settings = new DebuggerSettings(Directory.GetCurrentDirectory()); var debugger = new DebugManager(settings); var shell = new DebuggerShell(debugger); shell.AddCommand(new ExitCommand()); if (args.Length > 0) { var input = args[0].Replace("'", "\""); if (input.StartsWith("\"") && input.EndsWith("\"")) { input = input.Substring(1, input.Length - 2); } var lines = input.Split(';'); foreach (var line in lines) { if (!string.IsNullOrEmpty(line)) { Console.WriteLine(line); shell.Execute(line, OutputMessage); } } } while (true) { Console.ForegroundColor = ConsoleColor.Gray; Console.Write(">"); var input = Console.ReadLine(); if (string.IsNullOrEmpty(input)) { continue; } if (!shell.Execute(input, OutputMessage)) { Console.WriteLine("Unknown command. Type HELP for list of commands."); } } }
public void Save(XElement root) { var s = (DebuggerSettings)this.DataContext; XElement section = new XElement(DEBUGGER_SETTINGS); section.SetAttributeValue(SHOW_WARNINGS, s.ShowWarnings); section.SetAttributeValue(ASK_ARGUMENTS, s.AskForArguments); XElement existingElement = root.Element(DEBUGGER_SETTINGS); if (existingElement != null) { existingElement.ReplaceWith(section); } else { root.Add(section); } currentDebuggerSettings = null; // invalidate cached settings }
GoToInMemoryModuleStatement(Lazy <DbgCallStackService> dbgCallStackService, Lazy <ReferenceNavigatorService> referenceNavigatorService, DebuggerSettings debuggerSettings) { this.dbgCallStackService = dbgCallStackService; this.referenceNavigatorService = referenceNavigatorService; debuggerSettings.PropertyChanged += DebuggerSettings_PropertyChanged; }
public TheTagger(IClassificationTag classificationTag, DebuggerSettings debuggerSettings) { this.classificationTag = classificationTag; this.debuggerSettings = debuggerSettings; }
NumberTaggerProvider(IClassificationTypeRegistryService classificationTypeRegistryService, DebuggerSettings debuggerSettings) { stringClassificationTag = new ClassificationTag(classificationTypeRegistryService.GetClassificationType(ThemeClassificationTypeNames.Number)); this.debuggerSettings = debuggerSettings; }
ProcessFormatterProvider(DebuggerSettings debuggerSettings) => this.debuggerSettings = debuggerSettings;
public DebugManager(DebuggerSettings settings) { Settings = settings; this.profiler = new ProfilerContext(); }
SwitchToDebuggedProcess(DebuggerSettings debuggerSettings) => this.debuggerSettings = debuggerSettings;
CallStackFormatterProvider(DebuggerSettings debuggerSettings) => this.debuggerSettings = debuggerSettings;
IsDebuggerPresentHook(DebuggerSettings debuggerSettings) => this.debuggerSettings = debuggerSettings;
ExceptionConditionsChecker(Lazy <DbgExceptionSettingsService> dbgExceptionSettingsService, DebuggerSettings debuggerSettings) { this.dbgExceptionSettingsService = dbgExceptionSettingsService; this.debuggerSettings = debuggerSettings; }