From 43c2e01a6ef3ee893428ed6f5fc77b005f705e96 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Jul 2024 13:42:48 -0700 Subject: [PATCH] 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