提交 7c801e97 编写于 作者: A Andre Weinand

make ext API SourceBreakpoint use Location; fixes #39647

上级 8d6f510a
......@@ -308,13 +308,9 @@ declare module 'vscode' {
*/
readonly type: 'source';
/**
* The source to which this breakpoint is attached.
* The source and line position of this breakpoint.
*/
readonly source: Uri;
/**
* The line and character position of the breakpoint.
*/
readonly location: Position;
readonly location: Location;
}
export interface FunctionBreakpoint extends Breakpoint {
......
......@@ -110,7 +110,7 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape {
enabled: bp.enabled,
condition: sbp.condition,
hitCondition: bp.hitCondition,
sourceUriStr: sbp.uri.toString(),
uri: sbp.uri,
line: sbp.lineNumber > 0 ? sbp.lineNumber - 1 : 0,
character: (typeof sbp.column === 'number' && sbp.column > 0) ? sbp.column - 1 : 0
};
......
......@@ -635,7 +635,7 @@ export interface IBreakpointData {
export interface ISourceBreakpointData extends IBreakpointData {
type: 'source';
sourceUriStr: string;
uri: URI;
line: number;
character: number;
}
......
......@@ -12,7 +12,7 @@ import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace';
import * as vscode from 'vscode';
import URI from 'vs/base/common/uri';
import { Disposable, Position } from 'vs/workbench/api/node/extHostTypes';
import { Disposable, Position, Location } from 'vs/workbench/api/node/extHostTypes';
export class ExtHostDebugService implements ExtHostDebugServiceShape {
......@@ -148,8 +148,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
enabled: bp.enabled,
condition: bp.condition,
hitCondition: bp.hitCondition,
source: URI.parse(bp.sourceUriStr),
location: new Position(bp.line, bp.character)
location: new Location(bp.uri, new Position(bp.line, bp.character))
};
return sbp;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册