You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-sources/building/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,10 +26,10 @@ The context menu of a TC provides a few useful commands that automate some of th
26
26
This command first generates C++ code and a make file for the TC, and then runs the make tool on the generated make file. Note, however, that this command does not set the TC as active. If you plan to change code snippets in generated code you must set the TC as active yourself.
27
27
28
28
***Run**
29
-
First builds the TC, and then attempts to launch the executable that is produced. The executable is launched in a non-debug mode by specifying the launch argument `-URTS_DEBUG=quit`. If you instead want to launch the executable for debugging it you can go to the Terminal and manually launch it from there without any extra arguments. Note that if your TC creates a library rather than an executable, then this command will still build the TC, but will then give an error message since there is no executable to run.
29
+
First builds the TC, and then attempts to launch the executable that is produced. The executable is launched in a non-debug mode by specifying the launch argument `-URTS_DEBUG=quit`. If you want to launch the executable in a different way, for example with different command-line arguments, you can go to the Terminal and manually launch it from there. Note that if your TC creates a library rather than an executable, then this command will still build the TC, but will then give an error message since there is no executable to run.
30
30
31
31
!!! note
32
-
For a more flexible way of launching a built executable, consider using a [launch configuration](launch-configurations.md).
32
+
For a more flexible way of launching a built executable, either for running or debugging it, use a [launch configuration](../running-and-debugging/launch-configurations.md).
33
33
34
34
***Clean**
35
35
Removes the target workspace folder produced when building a TC. This means that all generated C++ code, the make file, as well as any produced binaries will be removed. If you only want to remove the binaries you can instead go to the Terminal and invoke `make clean` to clean using the make file.
@@ -41,7 +41,7 @@ If you build a TC and at least one error exists in the TC itself, in prerequisit
41
41
Use the setting [`code-rt.build.cancelOnError`](../settings.md#cancel-on-error) to suppress this dialog.
42
42
43
43
## Building and Running without a TC
44
-
In some cases of rapid prototyping and testing you may want to quickly build and run a capsule without first having to create a TC or a [launch configuration](launch-configurations.md). Then you can click the "Run" link that appears just before any capsule in the Art text editor.
44
+
In some cases of rapid prototyping and testing you may want to quickly build and run a capsule without first having to create a TC or a [launch configuration](../running-and-debugging/launch-configurations.md). Then you can click the "Run" link that appears just before any capsule in the Art text editor.
Copy file name to clipboardExpand all lines: docs-sources/running-and-debugging/debugging.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,10 +21,10 @@ There are two ways how you can start a new debug session.
21
21
1.[Launch](#launch) your application and start to debug it
22
22
2.[Attach](#attach) the debugger to an application that has already been launched
23
23
24
-
In both cases you need to start by creating a [launch configuration](../building/launch-configurations.md).
24
+
In both cases you need to start by creating a [launch configuration](launch-configurations.md).
25
25
26
26
### Launch
27
-
To launch your application and start to debug it use a [launch configuration](../building/launch-configurations.md) where the [request](../building/launch-configurations.md#request) attribute is set to "launch".
27
+
To launch your application and start to debug it use a [launch configuration](launch-configurations.md) where the [request](launch-configurations.md#request) attribute is set to "launch".
28
28
29
29
```json
30
30
"configurations": [
@@ -39,19 +39,19 @@ To launch your application and start to debug it use a [launch configuration](..
39
39
40
40
Then perform the command **Start Debugging** (++"F5"++).
41
41
42
-
As soon as the application has launched the Art Debugger will attach to it and pause the execution before the top capsule has been incarnated. The "Run and Debug" view then looks like this:
42
+
As soon as the application has launched the Art Debugger will attach to it and pause the execution before the top capsule has been incarnated. The "Art Debug" view then looks like this:
43
43
44
44

45
45
46
-
Perform the command **Continue** (++"F5"++) to resume execution of the application.
46
+
Perform the command **Continue** (++"F5"++) to resume execution of the application. You can then [view the application run-time structure](#application-runtime-structure).
47
47
48
48
### Attach
49
49
Sometimes it's not feasible to launch the application to debug. For example
50
50
51
51
- you may not want to debug the application from the beginning, but start when it has already executed for some time
52
52
- you may want to run the application on a different machine and debug it remotely
53
53
54
-
In this case your [launch configuration](../building/launch-configurations.md) should have the [request](../building/launch-configurations.md#request) attribute set to "attach".
54
+
In this case your [launch configuration](launch-configurations.md) should have the [request](launch-configurations.md#request) attribute set to "attach".
55
55
56
56
```json
57
57
"configurations": [
@@ -75,7 +75,7 @@ Before you perform the command **Start Debugging** (++"F5"++) the application mu
75
75
```
76
76
*Start the application without initially pausing the execution. Later a debug session can start by attaching the Art Debugger on the debug port 3652.*
77
77
78
-
If you start the application on a different machine than where {$product.name$} runs, then your launch configuration must set the [hostname](../building/launch-configurations.md#hostname) attribute to the IP address of that machine.
78
+
If you start the application on a different machine than where {$product.name$} runs, then your launch configuration must set the [hostname](launch-configurations.md#hostname) attribute to the IP address of that machine.
79
79
80
80
## Debug Toolbar
81
81
The debug toolbar appears as soon as the Art Debugger has launched or attached to an application to be debugged.
@@ -108,9 +108,9 @@ If a part has non-single multiplicity it can contain multiple capsule instances
108
108
109
109

110
110
111
-
Note that capsule instances can reside at any index that is valid according to the multiplicity of the part, and there can be "gaps". In the example above the part `c2` has multiplicity 5 (this can only be seen in the Art file, not in the Art Debug view) and it contains 3 capsule instances at indices 0, 1 and 4.
111
+
Note that capsule instances can reside at any index that is valid according to the multiplicity of the part, and there can be "gaps". In the example above the part `c2` has multiplicity 5 (this can only be seen in the Art file, not in the Art Debug view) and it contains 3 capsule instances at indices 0, 1 and 4. There are no capsule instances at index 2 and 3.
112
112
113
-
Also note that the capsule that is shown within square brackets for a capsule instance is its runtime type, which can be different from the part's type, but must be compatible with it. In the example above the capsule instance at index 4 has the type `Csub` while other instances have the type `C`. This can for example mean that the part `c3` is typed by the capsule `C` and that `Csub` is a capsule that inherits from `C`.
113
+
Also note that the capsule that is shown within square brackets for a capsule instance is its runtime type, which can be different from the part's type, but must be compatible with it. In the example above the capsule instance at index 4 has the type `Csub` while other instances have the type `C`. This can for example mean that the part `c2` is typed by the capsule `C` and that `Csub` is a capsule that inherits from `C`.
114
114
115
115
## Send Event
116
116
You can send an event by clicking the **Send Event** arrow that appears when you hover the mouse over a port in the Art Debug view.
@@ -128,11 +128,11 @@ If you choose to send an event with a data parameter, another popup appears wher
128
128
Data values are entered by using their ASCII encodings. See [Default Encoding/Decoding Rules](../target-rts/encoding-decoding.md#default-encodingdecoding-rules) to learn what the default encodings look like. Some common examples are listed below:
129
129
130
130
*`5`, `-14` : Integer value
131
-
*`0`, `4` : Enum literal value (corresponds to the declaration index of the enum literal; 0 for the first literal)
132
131
*`true`, `false` : Boolean value
133
132
*`3.14` : Float value
134
133
*`"hello!"` String value (don't forget the enclosing double quotes)
135
134
*`'a'` Char value (don't forget the enclosing single quotes)
135
+
*`0`, `4` : Enum literal value (corresponds to the declaration index of the enum literal; 0 for the first literal)
136
136
*`{x 10, y 15}` : Struct or class value (with fields `x` and `y` of integer type)
137
137
138
138
Note that if the event parameter has a type with a custom decode function, then the data value needs to be entered on the form expected by that decode function.
@@ -142,8 +142,12 @@ If the entered data value cannot be correctly decoded by the decode function of
142
142
For some events it's optional to provide data. For example, the `timeout` event on a `Timing` port can contain data, but doesn't have to. In this case you can simply press (++"Enter"++) to close the popup and send the event without a data value.
143
143
144
144
### Ports with Multiplicity
145
-
For ports with non-single multiplicity the Art Debug view shows entries for all indices of the port.
145
+
For ports with non-single multiplicity the Art Debug view shows the port multiplicity within square brackets:
146
146
147
147

148
148
149
-
To send an event to the port at a certain index, perform the **Send Event** command on that port index. Note that it's currently not possible to broadcast the event on all port indicies.
149
+
When you perform the **Send Event** command on such a port, you will be prompted for a port index on which to send the event:
150
+
151
+

152
+
153
+
If you don't specify a port index, the event will be sent on all port indices. This is known as **broadcasting** the event.
0 commit comments