Hello World

  1. We're going to assume that you already have your developer machine setup. If you don't, check out our developer machine setup guide.
  2. You'll need to make sure you have your EdgeOS device plugged into your computer and make sure that it's properly booted up. You'll know if it's properly booted up if you see device in your Edge VSCode Extension's "Devices" panel.

Step 1: Create a new project

macOS

mkdir hello-world
cd hello-world
edge init

Now your favorite editor (we highly recommend VSCode, Cursor, or Windsurf with the Edge VSCode Extension) and open the project.

Step 2: Open the project in your favorite editor

macOS

code . 
# or 
cursor .
# or
windsurf .

Step 3. Open the main.swift file

The edge init command will create a main.swift file for you. Open it in your favorite editor you should see the following code:

main.swift

// The Swift Programming Language
// https://docs.swift.org/swift-book

print("Hello, world!")

Step 4: Set a breakpoint

Set a breakpoint in the main.swift file by clicking on the line number right next to the print statement.

Breakpoint

Step 5. Select the EdgeOS device and make it active

In your Edge VSCode Extension, select the EdgeOS device and make it active.

Active Device

Step 6. Run the application

Next navigate to the Debugger panel in the Edge VSCode Extension and select "Debug hello-wrold on EdgeOS" from the dropdown menu. and then click the green play button to "Run".

Debug Panel

Step 7. Check that breakpoint was hit

Give it a few seconds, to build, and ship your debug code to your EdgeOS device. Note, that it could be a little slower on devices like the Raspberry Pi Zero 2 W compared to the Raspberry Pi 5 or NVIDIA Jetson Orin Nano.

Breakpoint Was Hit

Congratulations! You've just built your first EdgeOS application and debugged it with breakpoints!

Was this page helpful?