Skip to content

Commit

Permalink
fix: broken debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
Chronostasys committed Mar 29, 2024
1 parent 3c35b33 commit cd6f5a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pl.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ def get_summary(valobj:lldb.SBValue,internal_dict,options):


def __lldb_init_module(debugger, dict):
debugger.HandleCommand('type synthetic add --python-class pl.PLUnionProvider -x union[:<.>,\|]*')
# debugger.HandleCommand('type summary add -F pl.get_summary -x union[:<.>,]*')
debugger.HandleCommand('type summary add -F pl.get_summary -x union::[:<.>,\|]*')
# debugger.HandleCommand('type summary add --summary-string "HashTable" -x HashTable[:<.>,\|]*')
# debugger.HandleCommand('type synthetic add --python-class pl.PLHashTableProvider -x HashTable[:<.>,\|]*')
debugger.HandleCommand('type synthetic add --python-class pl.PLArrayProvider -x \[.+\]*')
debugger.HandleCommand('type synthetic add --python-class pl.PLUnionProvider -x union::[:<.>,\|]*')


14 changes: 6 additions & 8 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export function activate(context: ExtensionContext) {
} else {
p = "";
}
var execution = new vscode.ShellExecution("plc --debug " + fspath);
var execution = new vscode.ShellExecution("plc --debug -O0 " + fspath);
var problemMatchers = ["$myProblemMatcher"];
return [
new vscode.Task({ type: type }, vscode.TaskScope.Workspace,
"pl Build", "pivot-lang", execution, problemMatchers)
"pl Build debug", "pivot-lang", execution, problemMatchers)
];
},
resolveTask(task: vscode.Task, token?: vscode.CancellationToken) {
Expand Down Expand Up @@ -88,12 +88,10 @@ export function activate(context: ExtensionContext) {
});
});

vscode.commands.registerCommand("pivot-lang.run_current", () => {
vscode.commands.registerCommand("pivot-lang.run_current", async () => {
let fspath = vscode.window.activeTextEditor.document.uri.fsPath;
var execution = new vscode.ShellExecution("plc --debug" + fspath + " -o out && ./out");
vscode.tasks.executeTask(new vscode.Task({ type: "plrun" }, vscode.TaskScope.Workspace, "build", "pivot-lang", execution)).then((value) => {

});
var execution = new vscode.ShellExecution("plc " + fspath + " -o out\n./out");
vscode.tasks.executeTask(new vscode.Task({ type: "plrun" }, vscode.TaskScope.Workspace, "build", "pivot-lang", execution));
});

vscode.workspace.onDidChangeConfiguration((e) => {
Expand Down Expand Up @@ -149,7 +147,7 @@ class PLConfigurationProvider implements vscode.DebugConfigurationProvider {
return;
}
config.preLaunchTask = {
"task": "pl Build",
"task": "pl Build debug",
"type": type
};
if (!config.request) {
Expand Down

0 comments on commit cd6f5a1

Please sign in to comment.