if we set breakpoint in a file, we should stop in it - ignore sourcemap

This commit is contained in:
Vladimir Krivosheev
2015-11-05 17:22:16 +01:00
parent 8a07f2f50f
commit 2dcec71038
3 changed files with 26 additions and 14 deletions
@@ -27,8 +27,11 @@ import org.jetbrains.debugger.*
class CallFrameView @JvmOverloads constructor(val callFrame: CallFrame,
private val viewSupport: DebuggerViewSupport,
val script: Script? = null,
private val sourceInfo: SourceInfo? = viewSupport.getSourceInfo(script, callFrame),
private val isInLibraryContent: Boolean = sourceInfo != null && viewSupport.isInLibraryContent(sourceInfo, script)) : XStackFrame(), VariableContext {
sourceInfo: SourceInfo? = null,
isInLibraryContent: Boolean? = null) : XStackFrame(), VariableContext {
private val sourceInfo = sourceInfo ?: viewSupport.getSourceInfo(script, callFrame)
private val isInLibraryContent: Boolean = isInLibraryContent ?: (this.sourceInfo != null && viewSupport.isInLibraryContent(this.sourceInfo, script))
private var evaluator: XDebuggerEvaluator? = null
override fun getEqualityObject() = callFrame.equalityObject
@@ -18,19 +18,16 @@ package org.jetbrains.debugger.frame
import com.intellij.xdebugger.frame.XExecutionStack
import com.intellij.xdebugger.frame.XStackFrame
import com.intellij.xdebugger.settings.XDebuggerSettingsManager
import org.jetbrains.debugger.DebuggerViewSupport
import org.jetbrains.debugger.Script
import org.jetbrains.debugger.SuspendContext
import org.jetbrains.debugger.done
import org.jetbrains.debugger.*
import java.util.*
internal class ExecutionStackImpl(private val suspendContext: SuspendContext, private val viewSupport: DebuggerViewSupport, private val topFrameScript: Script?) : XExecutionStack("") {
internal class ExecutionStackImpl(private val suspendContext: SuspendContext, private val viewSupport: DebuggerViewSupport, private val topFrameScript: Script?, private val topFrameSourceInfo: SourceInfo? = null) : XExecutionStack("") {
private var topCallFrameView: CallFrameView? = null
override fun getTopFrame(): CallFrameView? {
val topCallFrame = suspendContext.topFrame
if (topCallFrameView == null || topCallFrameView!!.callFrame != topCallFrame) {
topCallFrameView = if (topCallFrame == null) null else CallFrameView(topCallFrame, viewSupport, topFrameScript)
topCallFrameView = if (topCallFrame == null) null else CallFrameView(topCallFrame, viewSupport, topFrameScript, topFrameSourceInfo)
}
return topCallFrameView
}
@@ -1,3 +1,18 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.debugger.frame
import com.intellij.xdebugger.frame.XSuspendContext
@@ -5,14 +20,11 @@ import org.jetbrains.concurrency.Promise
import org.jetbrains.concurrency.rejectedPromise
import org.jetbrains.concurrency.resolvedPromise
import org.jetbrains.concurrency.thenAsync
import org.jetbrains.debugger.DebuggerViewSupport
import org.jetbrains.debugger.EvaluateContext
import org.jetbrains.debugger.Script
import org.jetbrains.debugger.SuspendContext
import org.jetbrains.debugger.*
import org.jetbrains.debugger.values.StringValue
open class SuspendContextImpl(private val suspendContext: SuspendContext, debugProcess: DebuggerViewSupport, topFrameScript: Script?) : XSuspendContext() {
private val executionStack = ExecutionStackImpl(suspendContext, debugProcess, topFrameScript)
open class SuspendContextImpl(suspendContext: SuspendContext, debugProcess: DebuggerViewSupport, topFrameScript: Script?, topFrameSourceInfo: SourceInfo? = null) : XSuspendContext() {
private val executionStack = ExecutionStackImpl(suspendContext, debugProcess, topFrameScript, topFrameSourceInfo)
override fun getActiveExecutionStack() = executionStack