hirotake111 / devbcn-workshop

A walk-through codebase of Rust Full Stack Workshop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A walk-through codebase of Rust Full Stack Workshop

# Start local dev server
make run

# Unit/integration tests
make test

Debugging using Visual Studio Code

Make sure that you have these two extensions installed on your editor:

  • Rust Analyzer
  • CodeLLDB

Create a new file in the root of your project called .vscode/launch.json, and write the configuration as follows:

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "lldb",
      "request": "attach",
      "name": "Attach to Shuttle",
      "program": "${workspaceFolder}/target/debug/api-shuttle"
    }
  ]
}

The most important point to take into account here is that the program attribute must point to the binary that you want to debug.

Now it's ready.

  1. On your VSCode, put a breakpoint anywhere you want to inspect.
  2. Run your dev server (in this example, cargo shuttle run).
  3. Then press F5 (on macos, fn + F5) to start debugging.

About

A walk-through codebase of Rust Full Stack Workshop


Languages

Language:Rust 99.3%Language:Makefile 0.7%