[JavaScript Debugger] WEB-67881 Debugger ignores some breakpoints in code executed using ts-node

Now if a script has neither a source map nor a sourceMapUrl, the breakpoint will be set at the source position

GitOrigin-RevId: 923ed91bc9089aadc8f2067740ad4c38e84344dc
This commit is contained in:
Shumaf Lovpache
2024-07-29 16:55:27 +03:00
committed by intellij-monorepo-bot
parent ad9512d95e
commit bf34fcce1d
4 changed files with 7 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ org.jetbrains.debugger.DebugEventListener
- errorOccurred(java.lang.String):V
- navigated(java.lang.String):V
- resumed(org.jetbrains.debugger.Vm):V
- scriptAdded(org.jetbrains.debugger.Vm,org.jetbrains.debugger.Script,java.lang.String):V
- scriptAdded(org.jetbrains.debugger.Vm,org.jetbrains.debugger.Script):V
- scriptContentChanged(org.jetbrains.debugger.Script):V
- scriptRemoved(org.jetbrains.debugger.Script):V
- scriptsCleared():V

View File

@@ -17,7 +17,6 @@ package org.jetbrains.debugger;
import com.intellij.openapi.util.NlsContexts;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.EventListener;
@@ -40,7 +39,7 @@ public interface DebugEventListener extends EventListener {
/**
* Reports that a new script has been loaded.
*/
default void scriptAdded(@NotNull Vm vm, @NotNull Script script, @Nullable String sourceMapUrl) {
default void scriptAdded(@NotNull Vm vm, @NotNull Script script) {
}
/**

View File

@@ -43,6 +43,9 @@ interface Script : UserDataHolderEx {
@get:ApiStatus.Internal
var sourceMap: SourceMap?
@get:ApiStatus.Internal
val sourceMapUrl: String?
@get:ApiStatus.Internal
val url: Url

View File

@@ -23,5 +23,7 @@ abstract class ScriptBase(override val type: Script.Type,
override var sourceMap: SourceMap? = null
override val sourceMapUrl: String? = null
override fun toString(): String = "[url=$url, lineRange=[$line;$endLine]]"
}