do not recompile if we are in a debug session

pull/1/head
yann300 8 years ago
parent 62cd87978b
commit 4dfdd8a8a9
  1. 3
      src/app.js
  2. 6
      src/app/debugger.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) {

@ -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)

Loading…
Cancel
Save