本文整理汇总了TypeScript中commands.Command.updateScriptBreakpoints方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Command.updateScriptBreakpoints方法的具体用法?TypeScript Command.updateScriptBreakpoints怎么用?TypeScript Command.updateScriptBreakpoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类commands.Command
的用法示例。
在下文中一共展示了Command.updateScriptBreakpoints方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: showEditorBreakpoints
export function showEditorBreakpoints() {
var allBreakpoints = editorView.getEditorBreakpoints();
var breakpointRecords = [];
var breakpointIndex = 1;
for(var filePath in allBreakpoints) {
if(allBreakpoints.hasOwnProperty(filePath)) {
var breakpoints = allBreakpoints[filePath];
for(var lineNumber in breakpoints) {
if (breakpoints.hasOwnProperty(lineNumber)) {
if (breakpoints[lineNumber] == true) {
var resourcePathDetails: FilePath = FileTree.createResourcePath(filePath);
var displayName = "<div class='breakpointEnabled'>"+resourcePathDetails.getProjectPath()+"</div>";
breakpointRecords.push({
recid: breakpointIndex++,
name: displayName,
location : "Line " + lineNumber,
resource : resourcePathDetails.getProjectPath(),
line: parseInt(lineNumber),
script : resourcePathDetails.getResourcePath()
});
}
}
}
}
}
w2ui['breakpoints'].records = breakpointRecords;
w2ui['breakpoints'].refresh();
Command.updateScriptBreakpoints(); // update the breakpoints
}