From 4dfdd8a8a93002fee6eda30de7eb5f784d908a13 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 13 Apr 2017 11:34:23 +0200 Subject: [PATCH] do not recompile if we are in a debug session --- src/app.js | 3 ++- src/app/debugger.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index 59ddc20b7e..eaf2e885e7 100644 --- a/src/app.js +++ b/src/app.js @@ -380,7 +380,6 @@ var run = function () { var fileNames = Object.keys(files.list()) $filesEl.find('.file').remove() - $('#output').empty() for (var f in fileNames) { var name = fileNames[f] @@ -815,6 +814,8 @@ var run = function () { }) function runCompiler () { + if (transactionDebugger.isActive) return + editorSyncFile() var currentFile = ui.get('currentFile') if (currentFile) { diff --git a/src/app/debugger.js b/src/app/debugger.js index 01fad6d1d1..035649a6a7 100644 --- a/src/app/debugger.js +++ b/src/app/debugger.js @@ -11,6 +11,7 @@ function Debugger (id, appAPI, executionContextEvent, editorEvent) { this.sourceMappingDecoder = new remix.util.SourceMappingDecoder() this.el.appendChild(this.debugger.render()) this.appAPI = appAPI + this.isActive = false this.breakPointManager = new remix.code.BreakpointManager(this.debugger, (sourceLocation) => { return appAPI.offsetToLineColumn(sourceLocation, sourceLocation.file, this.editor, this.appAPI.lastCompilationResult().data) @@ -33,8 +34,13 @@ function Debugger (id, appAPI, executionContextEvent, editorEvent) { self.switchProvider(context) }) + this.debugger.event.register('newTraceLoaded', this, function () { + self.isActive = true + }) + this.debugger.event.register('traceUnloaded', this, function () { self.appAPI.currentSourceLocation(null) + self.isActive = false }) // unload if a file has changed (but not if tabs were switched)