Skip to content

Commit

Permalink
Document flags passed to cobc for debug
Browse files Browse the repository at this point in the history
Removes `-fsource-location` as it is implied by `-ftraceall`.
  • Loading branch information
nberth committed Oct 25, 2024
1 parent a4c94b6 commit 2d0ad6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,9 @@ whenever you start a debugging session, *e.g* with <kbd>F5</kbd>).

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)

Expand Down
2 changes: 1 addition & 1 deletion src/vscode/superbol-vscode-platform/superbol_tasks.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d0ad6a

Please sign in to comment.