From f2a39adc846078879475c3d95a3aee091644b54b Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 19 Jun 2024 11:43:51 -0700 Subject: [PATCH 1/2] Add federated execution debugging argument example. --- .../developer/debugging-generated-code.mdx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/versioned_docs/version-0.7.0/developer/debugging-generated-code.mdx b/versioned_docs/version-0.7.0/developer/debugging-generated-code.mdx index 2d6d8ec8b..e534a9468 100644 --- a/versioned_docs/version-0.7.0/developer/debugging-generated-code.mdx +++ b/versioned_docs/version-0.7.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 such as below. +``` +{ + "cmake.debugConfig": { + "args": [ + "-i", + "federation_id" + ] + } +} +``` \ No newline at end of file From db26217fde667611ed3a6594b72483a98f83d284 Mon Sep 17 00:00:00 2001 From: Marten Lohstroh Date: Tue, 2 Jul 2024 13:56:53 -0700 Subject: [PATCH 2/2] Update versioned_docs/version-0.7.0/developer/debugging-generated-code.mdx Co-authored-by: Peter Donovan <33707478+petervdonovan@users.noreply.github.com> --- .../version-0.7.0/developer/debugging-generated-code.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioned_docs/version-0.7.0/developer/debugging-generated-code.mdx b/versioned_docs/version-0.7.0/developer/debugging-generated-code.mdx index e534a9468..eab26b332 100644 --- a/versioned_docs/version-0.7.0/developer/debugging-generated-code.mdx +++ b/versioned_docs/version-0.7.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 such as below. +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": {