Hello all, I just created my first tap using the ...
# troubleshooting
s
Hello all, I just created my first tap using the cookie-cutter sdk. Does anyone have any suggestions on how to debug the tap on vscode? (a launch.json file example would be much appreciated)
p
Were you able to check code using meltano ? I have developed a tap on my local machine on windows, I need to export that to linux server.
s
Yeah on linux everything works locally!
p
s
Thank you so much @pat_nadolny!
p
To summarize though - what I did was created a main in my tap.py which gets referenced by the launch.json Matt included in his with a small tweak. Mine looks something like this:
Copy code
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${workspaceRoot}/tap_google_analytics/tap.py",
      "console": "integratedTerminal",
      "args": [
        "--config",
        "config.json"
      ]
    }
  ]
}
s
And then you call the debugger I assume?
p
Yep just hit "Run -> Start Debugging" and put some break points in there
s
Awesome thanks! And did you ever fall on an error like this?
I think it's because taps is not including my streams before running, but I'm not sure
UPDATE: It works. Had some issues using my venv, so I modified the config file by adding en path to my env
Copy code
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${workspaceRoot}/tap_hubspot/tap.py",
      "console": "integratedTerminal",
      "args": [
        "--config",
        ".secrets/config.json",
        "|",
        "target-jsonl"
      ],
      "env": {
        "PYTHONPATH": "${workspaceRoot}"
      }
    }
  ]
}
a
@Stéphane Burwash / @pat_nadolny - To help others, do you mind adding your launch config and any other tips here in this new StackOverflow question? Or do you mind if I go ahead and copy-paste your solution?
s
Please go ahead and copy paste it 😄
Always glad to help
a
Great - will do! Thanks again!