MCPcopy Index your code
hub / github.com/microsoft/vscode-js-debug / offsetSourceToScript

Method offsetSourceToScript

src/adapter/source.ts:135–145  ·  view source on GitHub ↗

Offsets a location that came from source code, to where it appears in the runtime script

(obj: T)

Source from the content-addressed store, hash-verified

133 }
134 /** Offsets a location that came from source code, to where it appears in the runtime script */
135 public offsetSourceToScript<T extends { lineNumber: number; columnNumber: number }>(obj: T): T {
136 if (this.runtimeScriptOffset) {
137 return {
138 ...obj,
139 lineNumber: obj.lineNumber + this.runtimeScriptOffset.lineOffset,
140 columnNumber: obj.columnNumber + this.runtimeScriptOffset.columnOffset,
141 };
142 }
143
144 return obj;
145 }
146
147 public async equalsDap(s: Dap.Source) {
148 const existingAbsolutePath = await this._existingAbsolutePath;

Callers 4

enableFunction · 0.45
updateForNewLocationsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected