From 2d0ad6aaff186ec076496598578751a89a0a987f Mon Sep 17 00:00:00 2001 From: Nicolas Berthier Date: Fri, 25 Oct 2024 10:29:01 +0200 Subject: [PATCH] Document flags passed to `cobc` for debug Removes `-fsource-location` as it is implied by `-ftraceall`. --- README.md | 6 +++--- src/vscode/superbol-vscode-platform/superbol_tasks.ml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7ed2dd7c3..2ee8ddb4f 100644 --- a/README.md +++ b/README.md @@ -318,9 +318,9 @@ whenever you start a debugging session, *e.g* with F5). Save the `tasks.json` as shown. Definitions for this task notably include a `for-debug` flag, that instructs the compiler to insert -debug annotations into generated executable files, as well as -`extra-args`, that can be edited to pass additional arguments to the -`cobc` compiler. +debug annotations into generated executable files (this effectively +passes flags `-ftraceall` and `-g` to `cobc`). The `extra-args` +setting can be edited to pass additional arguments to `cobc`. ![`tasks.json` for debug](./assets/superbol-tasks.json.png) diff --git a/src/vscode/superbol-vscode-platform/superbol_tasks.ml b/src/vscode/superbol-vscode-platform/superbol_tasks.ml index 1f5a206d4..a64d58361 100644 --- a/src/vscode/superbol-vscode-platform/superbol_tasks.ml +++ b/src/vscode/superbol-vscode-platform/superbol_tasks.ml @@ -134,7 +134,7 @@ let cobc_execution ?config attributes = config_string "cobol.source-format" ~config ~append:(fun f -> List.cons ("-fformat=" ^ f)) |> attr_bool_flag "for-debug" ~attributes - ~ok:(List.append ["-fsource-location"; "-ftraceall"; "-g"]) |> + ~ok:(List.append ["-ftraceall"; "-g"]) |> attr_bool_flag "for-coverage" ~attributes ~ok:(List.cons "--coverage") |> attr_bool_flag "executable" ~attributes