Skip to content

Commit

Permalink
fix #41
Browse files Browse the repository at this point in the history
  • Loading branch information
guyutongxue committed May 9, 2024
1 parent 25b4bd2 commit 0f362fc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src-tauri/src/tasks/dotvscode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ pub fn launch_json(args: &TaskArgs) -> Result<()> {
("console", serde_json::to_value("externalTerminal")?)
};

let json = json!({
let mut json = json!({
"version": "0.2.0",
"configurations": [
{
Expand All @@ -262,10 +262,19 @@ pub fn launch_json(args: &TaskArgs) -> Result<()> {
"MIMode": debugger_name, // Only used in cppdbg (GDB mode)
"miDebuggerPath": debugger_path, // ..
"preLaunchTask": if args.ascii_check { "ascii check" } else { "single file build" },
"internalConsosleOptions": "neverOpen"
"internalConsoleOptions": "neverOpen"
}
]
});
if debug_type == "cppdbg" {
json["configurations"][0]["setupCommands"] = json!([
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]);
}

debug!("launch.json: {}", json);

Expand Down

0 comments on commit 0f362fc

Please sign in to comment.