Skip to content

Commit 3926204

Browse files
committed
Updates for new WASM extension version
1 parent 92434e6 commit 3926204

1 file changed

Lines changed: 19 additions & 19 deletions

File tree

articles/iot-operations/develop-edge-apps/howto-build-wasm-modules-vscode.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The extension is supported on the following platforms:
2626

2727
- Linux
2828
- Windows Subsystem for Linux (WSL)
29-
- Windows
29+
- Windows (be sure to use a Windows shell such as PowerShell or Command Prompt when when you run the extension commands on Windows)
3030

3131
To learn more about graphs and WASM in Azure IoT Operations, see:
3232

@@ -48,8 +48,8 @@ Development environment:
4848
Docker images:
4949

5050
```bash
51-
docker pull mcr.microsoft.com/azureiotoperations/processor-app:1.1.4
52-
docker tag mcr.microsoft.com/azureiotoperations/processor-app:1.1.4 host-app
51+
docker pull mcr.microsoft.com/azureiotoperations/processor-app:1.1.5
52+
docker tag mcr.microsoft.com/azureiotoperations/processor-app:1.1.5 host-app
5353

5454
docker pull mcr.microsoft.com/azureiotoperations/devx-runtime:0.1.8
5555
docker tag mcr.microsoft.com/azureiotoperations/devx-runtime:0.1.8 devx
@@ -78,7 +78,9 @@ This command builds all the operators in the workspace and creates `.wasm` files
7878

7979
### Run the graph application locally
8080

81-
Press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Run Application Graph**. Select **release** as the run mode. This command runs the graph application locally by using the local execution environment with the `graph.dataflow.yaml` file in the workspace.
81+
To start the local execution environment, press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Start Development Environment**. Select **release** as the run mode.
82+
83+
When the local execution environment is running, press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Run Application Graph**. Select **release** as the run mode. This command runs the graph application locally by using the local execution environment with the `graph.dataflow.yaml` file in the workspace.
8284

8385
It also reads from `hostapp.env.list` to set the environment variable `TK_CONFIGURATION_PARAMETERS` for data flow operator configuration parameters.
8486

@@ -291,6 +293,8 @@ connections:
291293
292294
Copy the `data` folder that contains the sample data from the cloned samples repository `explore-iot-operations\samples\wasm\data` to the current workspace. The `data` folder contains three JSON files with sample input temperature data.
293295

296+
If you previously stopped the local execution environment, press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Start Development Environment**. Select **release** as the run mode.
297+
294298
Press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Run Application Graph**:
295299

296300
1. Select the `graph.dataflow.yaml` graph file.
@@ -352,13 +356,11 @@ You can modify the test data in the `data/` folder to experiment with different
352356

353357
### Build and run the state store scenario
354358

355-
1. Press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Build All Data Flow Operators**.
356-
357-
1. Select **release** as the build mode. Wait for the build to complete.
359+
If you previously stopped the local execution environment, press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Start Development Environment**. Select **release** as the run mode.
358360

359-
1. Press `Ctrl+Shift+P` again and search for **Azure IoT Operations: Run Application Graph**.
361+
1. Press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Build All Data Flow Operators**. Select **release** as the build mode. Wait for the build to complete.
360362

361-
1. Select **release** as the run mode.
363+
1. Press `Ctrl+Shift+P` again and search for **Azure IoT Operations: Run Application Graph**. Select **release** as the run mode.
362364

363365
1. Select the `data` folder in your VS Code workspace for your input data. The DevX container launches to run the graph with the sample input.
364366

@@ -435,6 +437,8 @@ The `data/` folder contains three test files:
435437

436438
### Build and run the schema registry scenario
437439

440+
If you previously stopped the local execution environment, press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Start Development Environment**. Select **release** as the run mode.
441+
438442
1. Press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Build All Data Flow Operators**.
439443

440444
1. Select **release** as the build mode. Wait for the build to complete.
@@ -459,13 +463,14 @@ After processing completes:
459463

460464
This example shows how the schema registry validates incoming messages and filters out messages that don't conform to the defined schema.
461465

466+
Stop the local execution environment when you're done testing in release mode by pressing `Ctrl+Shift+P` and searching for **Azure IoT Operations: Stop Development Environment**.
467+
462468
## Debug WASM modules using the VS Code extension
463469

464470
This example shows you how to debug WASM modules locally using breakpoints and the integrated debugger in VS Code.
465471

466472
### Prerequisites
467473

468-
469474
Complete the [Schema registry support for WASM modules](#schema-registry-support-for-wasm-modules) example to set up the sample workspace.
470475

471476
### Set up debugging
@@ -491,6 +496,8 @@ Complete the [Schema registry support for WASM modules](#schema-registry-support
491496

492497
### Run with debugging enabled
493498

499+
Press `Ctrl+Shift+P` to open the command palette and search for **Azure IoT Operations: Start Development Environment**. Select **debug** as the run mode.
500+
494501
1. Press `Ctrl+Shift+P` and search for **Azure IoT Operations: Run Application Graph**.
495502

496503
1. Select the `lldb-debug.graph.dataflow.yaml` graph file.
@@ -501,15 +508,6 @@ Complete the [Schema registry support for WASM modules](#schema-registry-support
501508

502509
1. After the DevX container launches, you see the host-app container start with an `lldb-server` for debugging.
503510

504-
You use a special debug graph file because the current debugger can attach to only one custom WASM operator in a debug session. The dedicated debug graph lets you keep your normal `graph.dataflow.yaml` and prevents the debugger from attaching unpredictably when multiple modules exist.
505-
506-
To create your own debug graph file:
507-
508-
1. Copy your regular `graph.dataflow.yaml` to a new file. Using the `lldb-` prefix is a convention but the name is arbitrary.
509-
1. Remove all other custom WASM operators except the one you want to debug.
510-
1. Rebuild the target operator in **debug** mode so the symbols are available.
511-
1. Run the debug graph with run mode set to **debug**. The extension launches an `lldb-server` and attaches VS Code automatically.
512-
513511
### Debug the WASM module
514512

515513
1. The execution automatically stops at the breakpoint you set in the `filter` function.
@@ -558,6 +556,8 @@ This debugging capability enables you to troubleshoot issues, understand data fl
558556

559557
- **Host app stability**: The local execution environment might occasionally stop working and require restarting to recover.
560558

559+
- **Remote debugging limitations**: Currently, you can't remotely debug WASM modules running in Azure Linux 3.0 due to incompatible LLDB versions.
560+
561561
## Troubleshooting
562562

563563
### Viewing logs

0 commit comments

Comments
 (0)