aqueduct_examples icon indicating copy to clipboard operation
aqueduct_examples copied to clipboard

How to debug services?

Open bartonhammond opened this issue 6 years ago • 1 comments

When I'm in Flutter, in login_widget.dart I try to Step into the following register function but I'm not able to. First I set a Breakpoint on line 61 and when it breaks, I use the Debugger button Step Into and it never gets into the register function.

61:  Store.instance.userController.register(
            usernameController.text, passwordController.text);

bartonhammond avatar Jan 07 '19 23:01 bartonhammond

Hi, I don't know is very late, but I debug with VSCode, using a dart and flutter extension, and use env var burned in the config of vscode

.vscode/launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Dart",
      "program": "bin/main.dart",
      "request": "launch",
      "type": "dart",
      "env": {
        "SMS_SERVER": "http://localhost:4000",
        "SMS_USER": "FakeUser",
        "SMS_PASSWORD": "FakePassword",
        "DATABASE_CONNECTION_URL": "postgres://bk_service_user:password@localhost:5432/bk_service"
      }
    }

I put the debug points, and works for me...

jairoFernandez avatar May 29 '20 23:05 jairoFernandez