Skip to content

Dev manual

YingXue edited this page Nov 12, 2022 · 12 revisions

How to release

pipeline link: https://dev.azure.com/azureiotdevxp/azure-iot-explorer/_build?definitionId=95

You have two options to release Explorer

  • Create a tag and push to github first. Version must start with v. For example, if version is '0.10.1' in package.json, you should create tag v0.10.1 . In this case, the pipeline will automatically create a draft release, all you need to do is tweak the release message a bit and publish it.
  • Or let the pipeline build finish, then download the signed artifects (Mac, Windows and Linux). Manually create a release (https://github.com/Azure/azure-iot-explorer/releases) and upload the artifects. A new tag needs to be created manually during creating the release, and the rule is the same as 1.

How to get download raw data

How to debug Electron Main (Dev)

Problem Statement

Electron Apps run some code in a main process that cannot be debugged through browser development tools. The following instructions specify how to use Visual Studio Code to debug code running in the main process.

Steps

  • In the root folder of your repo -- create a folder named .vscode
  • Add a file entitled launch.json
  • Save the following contents to launch.json

{ "version": "0.2.0", "configurations":[{ "name": "Debug Main Process", "type": "node", "request": "launch", "cwd": "${workspaceFolder}", "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", "windows": { "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd" }, "args" : ["."], "outputCapture": "std" }] }

  • Click the Visual Studio Code 'Run' arrow button (Ctrl+Shift+D)
  • Click Node.js in the drop down
  • Select your script from drop down (e.g. Run Script: electron)
  • Place a breakpoint on the desired Javascript file (located on 'host' in IoT Explorer)
  • Click the green run arrow.

REF: https://www.electronjs.org/docs/tutorial/debugging-vscode

What's currently utilize IPC:

  1. Retreive local folder
  2. Retreive local model defintion
  3. Telemetry (removing)
  4. Resolve model from public model repo

For local development, we are still spawning a local controller (using code from ServerBase.ts) while in electron mode, the above five calls are going through IPC channel.

Some stashed document for reference:

https://docs.microsoft.com/en-us/azure/iot-pnp/concepts-digital-twin

https://microsoft.sharepoint.com/teams/IoTHubExtension/Shared%20Documents/Forms/AllItems.aspx?viewid=2817bd84%2D1e60%2D4e3c%2D997c%2D79f68f90f91e&id=%2Fteams%2FIoTHubExtension%2FShared%20Documents%2FAzure%20IoT%20Explorer