Skip to content

Commit 66b1934

Browse files
committed
Add Sequence Diagram to ARCHITECTURE.md
Closes #48
1 parent d88f050 commit 66b1934

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

ARCHITECTURE.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RxJS-specific debugging reuses debugging sessions started by *Visual Studio Code
1414

1515
### RxJS Debugging Extension
1616

17-
The [*RxJS Debugging Extension*](./packages/extension) integrates with *Visual Studio Codes* using its extension API and provides the relevant user interfaces and functionalities. It allows developers to use RxJS debugging features like operator log points.
17+
The [*RxJS Debugging Extension*](./packages/extension) integrates with *Visual Studio Code* using its extension API and provides relevant user interfaces and functionalities. It allows developers to use RxJS debugging features like operator log points.
1818

1919
Furthermore, it ensures that, once a *js-debug* debugging session is started, essential hooks are registered in the *JavaScript VM* using [CDP Bindings](#cdp-bindings).
2020

@@ -46,3 +46,11 @@ Once the *RxJS Debugging Extensions* detects a new *js-debug* debugging session,
4646
| `sendRxJsDebuggerTelemetry` | `string` | Sends a JSON-encoded [TelemetryEvent](./packages/telemetry/src/index.ts) to the *RxJS Debugging Extension*. |
4747

4848
Both the *RxJS Debugging Extension* as well as the *Debugging Runtime* use a well defined communication protocol implemented by their respective telemetry bridges.
49+
50+
## Example System Interaction
51+
52+
Based on [testbench-nodejs](./packages/testbench-nodejs), the following sequence diagram shows typical interactions between the presented system components.
53+
54+
*The JavaScript VM component is omitted for clarity.*
55+
56+
![Example System Interaction Sequence Diagram](./docs/system-interactions-sequence-diagram.svg)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
sequenceDiagram
2+
participant User
3+
participant vscode
4+
participant jsdebug as js-debug
5+
participant Extension as RxJS Debugging Extension
6+
participant Program as RxJS Program
7+
participant Runtime as Debugging Runtime
8+
9+
10+
User->>+vscode: Open observable.ts
11+
vscode-->>User: Show observable.ts
12+
vscode-->>+Extension: Opened observable.ts
13+
Extension->>Extension: Recommend Operator Log Points
14+
Extension->>-vscode: Update Operator Log Point Decorations
15+
vscode-->>User: Show Operator Log Point Decorations
16+
User->>+Extension: Enable Operator Log Point
17+
Extension->>Extension: Enable Operator Log Point
18+
Extension->>-vscode: Update Operator Log Point Decorations
19+
vscode-->>User: Show Operator Log Point Decorations
20+
21+
User->>vscode: Start Debug
22+
vscode->>+jsdebug: Start Debug Session
23+
jsdebug->>+Extension: Will Start Debug Session
24+
Extension-->>jsdebug: Customize Debug Session with Debugging Runtime
25+
jsdebug->>+Program: Launch and inject Debugging Runtime
26+
Runtime->>Program: Patch RxJS
27+
Runtime->>Extension: Call Binding "rxJsDebuggerRuntimeReady"
28+
Extension->>Runtime: updateOperatorLogPoints()
29+
loop
30+
Program->>Runtime: Telemetry Data
31+
Runtime->>Extension: Telemetry Data
32+
Extension->>vscode: Update Live Log Decoration for observable.ts
33+
vscode-->>User: Show Live Log Decoration
34+
end
35+
36+
Program-->>-jsdebug: Process exited
37+
jsdebug-->>vscode: Debug Session terminated
38+
jsdebug->>-Extension: Debug Session terminated
39+
Extension->>-vscode: Clear Live Log Decoration
40+
vscode-->>-User: Hide Live Log Decoration

0 commit comments

Comments
 (0)