Skip to content

Commit cd6f5a1

Browse files
committed
fix: broken debug info
1 parent 3c35b33 commit cd6f5a1

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

pl.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ def get_summary(valobj:lldb.SBValue,internal_dict,options):
9999

100100

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

108108

src/extension.ts

+6-8
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ export function activate(context: ExtensionContext) {
3232
} else {
3333
p = "";
3434
}
35-
var execution = new vscode.ShellExecution("plc --debug " + fspath);
35+
var execution = new vscode.ShellExecution("plc --debug -O0 " + fspath);
3636
var problemMatchers = ["$myProblemMatcher"];
3737
return [
3838
new vscode.Task({ type: type }, vscode.TaskScope.Workspace,
39-
"pl Build", "pivot-lang", execution, problemMatchers)
39+
"pl Build debug", "pivot-lang", execution, problemMatchers)
4040
];
4141
},
4242
resolveTask(task: vscode.Task, token?: vscode.CancellationToken) {
@@ -88,12 +88,10 @@ export function activate(context: ExtensionContext) {
8888
});
8989
});
9090

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

9997
vscode.workspace.onDidChangeConfiguration((e) => {
@@ -149,7 +147,7 @@ class PLConfigurationProvider implements vscode.DebugConfigurationProvider {
149147
return;
150148
}
151149
config.preLaunchTask = {
152-
"task": "pl Build",
150+
"task": "pl Build debug",
153151
"type": type
154152
};
155153
if (!config.request) {

0 commit comments

Comments
 (0)