MeltanoLabs / target-snowflake

Singer Target for the Snowflake cloud Data Warehouse
https://hub.meltano.com/loaders/target-snowflake--meltanolabs/
Other
9 stars 20 forks source link

feat: Support breakpoint()'s / document debug steps #115

Open visch opened 12 months ago

visch commented 12 months ago

Having a seperate issue but I'm having a tough time debugging as my debug statements (adding breakpoint() ) don't work seemingly because of the use of joblib.parallel. Maybe just a writeup in the docs for how to debug this target / add debug statements?

Maybe I'm just a noob and I should use a different debugger

pnadolny13 commented 12 months ago

@visch I can't help with your specific ask but I use VS code for this and it works pretty well. For targets the args need to be slightly different than whats documented though to pipe in input data.

        {
            "name": "Python: File",
            "type": "python",
            "request": "launch",
            "program": "${workspaceRoot}/target_snowflake/target.py",
            "args": [
                "<",
                "test_input.json",
                "--config",
                ".secrets/config.json",
            ],
            "justMyCode": false
        }

I also find the VS code test debugger very helpful to step through failing tests because they get fairly complicated.