From 43c2e01a6ef3ee893428ed6f5fc77b005f705e96 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Jul 2024 13:42:48 -0700 Subject: [PATCH 1/2] Add generated code debug argument instructions to v0.8.0 and latest. --- docs/developer/debugging-generated-code.mdx | 14 ++++++++++++++ .../developer/debugging-generated-code.mdx | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/docs/developer/debugging-generated-code.mdx b/docs/developer/debugging-generated-code.mdx index 2d6d8ec8b..eab26b332 100644 --- a/docs/developer/debugging-generated-code.mdx +++ b/docs/developer/debugging-generated-code.mdx @@ -61,3 +61,17 @@ If, for example, your federated program is in `src/Foo.lf` and it has a top-leve then you will find the generated code for the `bar` federate in `fed-gen/Foo/src-gen/federate__bar`. You can then run and debug that individual federate from within VS Code, but you will also have to manually run the RTI and the other federates in order for the code to start executing. + +### Adding Arguments + +To add arguments using VS code, you should add a directory `.vscode` right below the opened `src-gen` directory and add a `settings.json` file like the one below. In place of `federation_id`, write the actual federation ID that is being used by the RTI. +``` +{ + "cmake.debugConfig": { + "args": [ + "-i", + "federation_id" + ] + } +} +``` \ No newline at end of file diff --git a/versioned_docs/version-0.8.0/developer/debugging-generated-code.mdx b/versioned_docs/version-0.8.0/developer/debugging-generated-code.mdx index 2d6d8ec8b..eab26b332 100644 --- a/versioned_docs/version-0.8.0/developer/debugging-generated-code.mdx +++ b/versioned_docs/version-0.8.0/developer/debugging-generated-code.mdx @@ -61,3 +61,17 @@ If, for example, your federated program is in `src/Foo.lf` and it has a top-leve then you will find the generated code for the `bar` federate in `fed-gen/Foo/src-gen/federate__bar`. You can then run and debug that individual federate from within VS Code, but you will also have to manually run the RTI and the other federates in order for the code to start executing. + +### Adding Arguments + +To add arguments using VS code, you should add a directory `.vscode` right below the opened `src-gen` directory and add a `settings.json` file like the one below. In place of `federation_id`, write the actual federation ID that is being used by the RTI. +``` +{ + "cmake.debugConfig": { + "args": [ + "-i", + "federation_id" + ] + } +} +``` \ No newline at end of file From 8962aace051f7b48ba4da0328210f8675fa54074 Mon Sep 17 00:00:00 2001 From: Marten Lohstroh Date: Tue, 9 Jul 2024 12:37:06 -0700 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Peter Donovan <33707478+petervdonovan@users.noreply.github.com> --- docs/developer/debugging-generated-code.mdx | 2 +- .../version-0.8.0/developer/debugging-generated-code.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developer/debugging-generated-code.mdx b/docs/developer/debugging-generated-code.mdx index eab26b332..68fb50d7d 100644 --- a/docs/developer/debugging-generated-code.mdx +++ b/docs/developer/debugging-generated-code.mdx @@ -64,7 +64,7 @@ to manually run the RTI and the other federates in order for the code to start e ### Adding Arguments -To add arguments using VS code, you should add a directory `.vscode` right below the opened `src-gen` directory and add a `settings.json` file like the one below. In place of `federation_id`, write the actual federation ID that is being used by the RTI. +To add arguments using VS Code, you should add a directory `.vscode` right below the opened `src-gen` directory and add a `settings.json` file like the one below. In place of `federation_id`, write the actual federation ID that is being used by the RTI. ``` { "cmake.debugConfig": { diff --git a/versioned_docs/version-0.8.0/developer/debugging-generated-code.mdx b/versioned_docs/version-0.8.0/developer/debugging-generated-code.mdx index eab26b332..68fb50d7d 100644 --- a/versioned_docs/version-0.8.0/developer/debugging-generated-code.mdx +++ b/versioned_docs/version-0.8.0/developer/debugging-generated-code.mdx @@ -64,7 +64,7 @@ to manually run the RTI and the other federates in order for the code to start e ### Adding Arguments -To add arguments using VS code, you should add a directory `.vscode` right below the opened `src-gen` directory and add a `settings.json` file like the one below. In place of `federation_id`, write the actual federation ID that is being used by the RTI. +To add arguments using VS Code, you should add a directory `.vscode` right below the opened `src-gen` directory and add a `settings.json` file like the one below. In place of `federation_id`, write the actual federation ID that is being used by the RTI. ``` { "cmake.debugConfig": {