WASDEV(The AI WorkShop)Docs Website Download

Chapter 7

Run, debug, test and deploy

Start your project with one button, stop on a breakpoint, run the tests, manage environment variables and send the project to your server.

Run the project

  1. In the module bar, open the run configuration list and choose what to run. Active file runs the file you are editing.
  2. Click Run or press F5.
  3. The output appears in the bottom panel; a web project opens in the built-in browser.
  4. Click Stop (Shift+F5) to stop it, or Restart (Ctrl+Shift+F5) to start again.
  • Ctrl+F5 runs only the active file.
  • WASDEV detects web, mobile, desktop and firmware projects. If the detection is wrong, see the next tutorial.
The Run menu: start, stop, restart and the GAD commands
The Run menu: start, stop, restart and the GAD commands

Edit the run configurations

The Run and Debug view
The Run and Debug view
  1. Click the Run icon in the activity bar, or press Ctrl+Shift+D. The view RUN AND DEBUG opens.
  2. Select a configuration in the list and click Run the selected configuration.
  3. Click Detect again if you changed the type of the project.
  4. Click Edit .wasdev/run.json to write your own command, then save the file.
  • For a mobile project, a button asks again where to run: phone, emulator or browser.

Debug with breakpoints

Two breakpoints in the margin of the editor, next to the Run and Debug view
Two breakpoints in the margin of the editor, next to the Run and Debug view
  1. Open the file you want to inspect.
  2. Click in the margin left of a line number, or press F9, to put a breakpoint. A red dot appears.
  3. Press F6, or click Start debugging (active file) in the Run and Debug view.
  4. The program stops on the breakpoint. Read the values in Variables and the path in Call stack.
  5. Press F10 to Step over, F11 to Step into, Shift+F11 to Step out, F8 to Continue.
  6. Press Shift+F6 to stop debugging.
  • Type an expression in the expression box to see its value at this point.
  • Debugging exists for Python, JavaScript and Node, PHP (Xdebug), C, C++ and Rust, Go, and Dart / Flutter. WASDEV proposes to install the debugger the first time.

Run the tests

The Tests view
The Tests view
  1. Click the Tests icon in the activity bar, or press Ctrl+Alt+Shift+T.
  2. Click Run all tests.
  3. Read the result: each test is marked passed or failed.
  4. Click a failed test, then Open the file to go to it, or Show full output to read the error.
  5. After a fix, click Rerun failed tests.
  • Right-click a test for Run this test or Run this whole file.
  • Supported: pytest, Jest, Vitest, PHPUnit, cargo test, go test and flutter test. Install adds the missing framework.

Manage environment variables

The Env page: variables of the .env file
The Env page: variables of the .env file
  1. Click the Env icon in the activity bar, or press Ctrl+Alt+Shift+E.
  2. The tab Variables lists the content of your .env file. Click Add a variable, type the name and the value.
  3. Click Save.
  4. Open the tab Compare to see which variables differ between two files, for example .env and .env.example.
  • .env.example creates the example file without the secret values.
  • If a .env file is tracked by Git, a banner offers Protect them (adds it to .gitignore) and Remove from Git.

Deploy to your server

The Deploy dialog
The Deploy dialog
  1. Click Deploy in the module bar, or press Ctrl+Alt+Shift+D.
  2. In Server, choose a site saved in the Site Manager (see the chapter Server).
  3. Fill Folder on the server, and Build if the project must be built first.
  4. Fill Folder to upload and, in Don't upload, the files to leave out.
  5. Add Environment variables, the Site URL and any SSH commands after the upload. Presets proposes common ones.
  6. Read the preview line, which counts the files that will be uploaded, then click Save config and Deploy.
  • Go live (1 click) puts a site online on a VPS that runs HestiaCP: enter the Domain, the HestiaCP user and tick HTTPS with Let's Encrypt.