#how do you folks debug the engine ?

1 messages · Page 1 of 1 (latest)

red relic
#

I am trying to see how dagger is starting and mapping services in the engine . It would of immense help if people can share how they debug the dagger client and server together

paper glen
#

@red relic we generally write an integration test which aims to repro the issue that were seeing. The dagger repo has plenty of integration tests where a dev engine is spawned to run the pipelines

red relic
red relic
#

https://github.com/dagger/dagger/blob/main/core/integration/services_test.go#L1244
I am trying to start this ☝️ integration test using vscode. It looks like its defaulting to using the dagger engine from the downloaded cli at this line https://github.com/dagger/dagger/blob/main/sdk/go/internal/engineconn/engineconn.go#L60

still trying to figure how to make sure it uses an engine i am debugging. There might be additional env variables i have to set for this integration test to use an engine that is already running
i maybe have to set DAGGER_SESSION_PORT , and DAGGER_SESSION_TOKEN to point to an engine that is being debugged so i can stop where i want in the engine code

here is my vscode test configuration

    {
      "name": "engine-test",
      "type": "go",
      "request": "launch",
      "mode": "test",

      "console": "integratedTerminal",
      "envFile": "${workspaceFolder}/bin/.env",
      "program": "${workspaceFolder}/core/integration",
      
      "args": [
        "-test.run",
        "TestServiceHostToContainer"
      ]
    },
paper glen