Reputation: 83
Have been trying to build and run a custom Azure IoT Edge Module, in VS Code, on macOS. When I try to Build and Run IoT Edge Solution in Simulator, the
Please setup iotedgehubdev first before starting simulator
alert pops up. Completed the setup successfully and yet, every time this very warning pops up and am unable to perform the 'build and run' process.
Upvotes: 2
Views: 1086
Reputation: 11
I had the same issue today working on a fresh linux install on my laptop. I figured that the simulator needs 3 steps:
I setup vscode and going through the example at https://learn.microsoft.com/en-us/azure/iot-edge/how-to-vs-code-develop-module?view=iotedge-2020-11 then find out several things:
In the end, I read the instructions related to the Azure Iot EdgeHub dev tool https://github.com/Azure/iotedgehubdev. Here is how I got it to work:
sudo "iotedgehubdev" start -d ./config/<your debug deployment file> -v
At this point you are attached to the program running in a container, and the breakpoint should get hit as expected.
you can't use the command palette to stop the simulator, if you have the -v option where docker-compose gives you logs. the command gets written to the terminal and does nothing in the middle of the logs. you just have to Ctrl+C in the terminal to end the simulation, though edgehub keeps running. You stop it with
sudo "iotedgehubdev" stop
Upvotes: 1
Reputation: 1
I am assuming you have Azure IoT Hub tool extension for VSCode installed. In the explorer menu pane (on left), navigate to 'Azure IoT Hub' -> Pick your Edge device and right click. You will see option 'Setup IoT Simulator' and click.
It will automatically fetch the device connection string for the device. Then you should be able to build it.
Upvotes: 0