Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions luahelper-vscode/src/debug/luaDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import * as Net from 'net';
import { DataProcessor } from './dataProcessor';
import { DebugLogger } from '../common/logManager';
//import { StatusBarManager } from '../common/statusBarManager';
import { LineBreakpoint, ConditionBreakpoint, LogPoint } from './breakpoint';
import { LineBreakpoint, ConditionBreakpoint, LogPoint } from './breakPoint';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大小写拼写错误

import { Tools } from '../common/tools';
//import { UpdateManager } from './updateManager';
import { ThreadManager } from '../common/threadManager';
Expand Down Expand Up @@ -349,15 +349,15 @@ export class LuaDebugSession extends LoggingDebugSession {
env: {},
});

let progaamCmdwithArgs = '"' + args.program + '"';
if (os.type() === "Windows_NT") {
progaamCmdwithArgs = '& ' + progaamCmdwithArgs;
let programCmdWithArgs = '"' + args.program + '"';
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

单词拼写错误

if (this.isPowerShellTerminal()) {
programCmdWithArgs = '& ' + programCmdWithArgs;
}
for (const arg of args.args) {
progaamCmdwithArgs = progaamCmdwithArgs + " " + arg;
programCmdWithArgs = programCmdWithArgs + " " + arg;
}

this._programTermianl.sendText(progaamCmdwithArgs , true);
this._programTermianl.sendText(programCmdWithArgs , true);
this._programTermianl.show();
}else{
let progError = "[Warning] 配置文件 launch.json 中的 program 路径有误: \n";
Expand All @@ -369,7 +369,12 @@ export class LuaDebugSession extends LoggingDebugSession {
}
}
}


private isPowerShellTerminal(): boolean {
const config = vscode.workspace.getConfiguration();
const shellPath = config.get<string>("terminal.integrated.shell.windows");
return shellPath && shellPath.toLowerCase().includes("powershell.exe");
}
private startServer(sendArgs){
this.connectionFlag = false;
//3. 启动Adapter的socket | VSCode = Server ; Debugger = Client
Expand Down