1、添加windows版本gdb路径设置支持,qt支持
This commit is contained in:
parent
747c4af5f7
commit
09fb4bbbaa
|
@ -1,3 +1,7 @@
|
|||
# 0.2.6
|
||||
- feat: windows gdb path set;
|
||||
- feat: windows qt support;
|
||||
|
||||
# 0.2.5
|
||||
- feat: support stl variable, such as vector、deque、map、set、unordered_set、bitset and so on;
|
||||
- feat: merge win32 gdb check from upstream github;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"debug"
|
||||
],
|
||||
"license": "mit",
|
||||
"version": "0.2.5",
|
||||
"version": "0.2.6",
|
||||
"publisher": "KylinIDETeam",
|
||||
"icon": "images/native-debug.png",
|
||||
"engines": {
|
||||
|
|
|
@ -84,6 +84,7 @@ export class GDBDebugSession extends MI2DebugSession {
|
|||
return;
|
||||
}
|
||||
this.miDebugger = new MI2(dbgCommand, ["-q", "--interpreter=mi2"], args.debugger_args, args.env);
|
||||
|
||||
this.args = args;
|
||||
this.disassember = new GdbDisassembler(this, args.showDevDebugOutput);
|
||||
this.setPathSubstitutions(args.pathSubstitutions);
|
||||
|
@ -126,7 +127,7 @@ export class GDBDebugSession extends MI2DebugSession {
|
|||
args.autorun.forEach(command => {
|
||||
this.miDebugger.sendUserInput(command);
|
||||
});
|
||||
if(this.miDebugger.application === 'gdb'){
|
||||
if(this.miDebugger.application.includes('gdb')){
|
||||
if(args.terminal === 'integrated' || args.terminal === '' || args.terminal === undefined){
|
||||
let terminalRequestArgs:DebugProtocol.RunInTerminalRequestArguments = {
|
||||
kind: "integrated",
|
||||
|
|
|
@ -109,10 +109,18 @@ export class MI2DebugSession extends DebugSession {
|
|||
|
||||
protected checkCommand(debuggerName: string): boolean {
|
||||
try {
|
||||
if(process.platform === 'win32' && debuggerName.includes("\\"))
|
||||
{
|
||||
const command = 'dir';
|
||||
execSync(`${command} ${debuggerName}`, { stdio: 'ignore' });
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
const command = process.platform === 'win32' ? 'where' : 'command -v';
|
||||
execSync(`${command} ${debuggerName}`, { stdio: 'ignore' });
|
||||
logger.debug(`Found debugger ${debuggerName}`);
|
||||
return true;
|
||||
}
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue