Skip to content

Commit

Permalink
Merge pull request #27 from pbdm/master
Browse files Browse the repository at this point in the history
support custom debug config for both lldb and other types
  • Loading branch information
waruqi authored Mar 20, 2020
2 parents 30402ef + b54dc54 commit 9de64db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,7 @@
},
"xmake.customDebugConfig": {
"type": "object",
"default": {
"type": "cppdbg"
},
"default": {},
"description": "The Custom Debugging Configurations when xmake.debugConfigType is custom"
}
}
Expand Down
13 changes: 7 additions & 6 deletions src/debugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,15 @@ export class Debugger implements vscode.Disposable {
};
}

if (config.debugConfigType == "custom") {
var customcfg = config.customDebugConfig;
for (let key in customcfg) {
debugConfig[key] = customcfg[key];
}
}
}

var customcfg = config.customDebugConfig;
for (let key in customcfg) {
debugConfig[key] = customcfg[key];
}
// default type if not set yet
debugConfig.type = debugConfig.type || 'cppdbg';

// start debugging
if (debugConfig) {
await vscode.debug.startDebugging(vscode.workspace.workspaceFolders[0], debugConfig);
Expand Down

0 comments on commit 9de64db

Please sign in to comment.