Skip to content

Commit

Permalink
支持运行中启用Tracy
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Oct 15, 2024
1 parent beb24d1 commit e826f21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/console/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ function registerAllMethods() {
client.setMultiMode(false);
}
});

registerMethod('createTracy', async (client) => {
await tools.tracy.launch();
});
}

export function init() {
Expand Down
6 changes: 3 additions & 3 deletions src/mainMenu/pages/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ function 多开模式() {
return node;
}

function 启用tracy() {
let node = new TreeNode('启用tracy', {
function 启用Tracy() {
let node = new TreeNode('启用Tracy', {
description: '下次编辑器更新后可用',
tooltip: '对Lua进行性能分析,但是会大幅影响运行效率',
checkboxState: config.tracy ? vscode.TreeItemCheckboxState.Checked : vscode.TreeItemCheckboxState.Unchecked,
Expand Down Expand Up @@ -178,7 +178,7 @@ export class 功能 extends TreeNode {
},
}),
多开模式(),
启用tracy(),
启用Tracy(),
切换自定义视图(),
]
});
Expand Down

0 comments on commit e826f21

Please sign in to comment.