Mark
04/20/2021, 12:00 AMrex
04/20/2021, 5:14 AMlaunch.json
configuration to attach the vscode debugger to the dagit process{
"name": "Debug Dagit",
"type": "python",
"request": "launch",
"module": "dagit",
"cwd": "${workspaceFolder}",
"args": [
"-w",
"your/workspace/path/workspace.yaml"
],
"console": "integratedTerminal",
}
Mark
04/20/2021, 10:08 AMalex
04/20/2021, 2:39 PM"subProcess": true
in the config section since dagit
will use subprocess for interacting with your code and running pipelinesMark
04/24/2021, 2:27 PMalex
04/26/2021, 3:23 PMdagster-daemon
so you would have to run that in a debugger which is not as simple since its not its own python moduleMark
05/01/2021, 10:13 AMdagster sensor preview
? If not it should be possible to at least attach the debugger to a separate sensor launched that way, right?prha
05/04/2021, 4:27 PMpdb.set_trace()
and then run dagster sensor preview <sensor_name>
?Mark
05/09/2021, 1:25 PMdagster sensor preview...
that would be great.alex
05/10/2021, 2:51 PM{
"name": "dagster sensor",
"type": "python",
"request": "launch",
"module": "dagster",
"args": [
"sensor",
"preview",
// other args here
]
},
Aaron Hoffer
05/02/2022, 5:29 PMDAGSTER_HOME=/Users/aaron/dagster_home/ dagster-daemon run --python-file repo.py
in a separate shell.
{
"name": "Debug Dagit",
"type": "python",
"request": "launch",
"module": "dagit",
"cwd": "${workspaceFolder}/pipeline",
"env": {
"DAGSTER_HOME":"/Users/aaron/dagster_home/"
},
"args": [
"-f",
"repo.py"
],
"console": "integratedTerminal",
"subProcess": true
alex
05/02/2022, 5:34 PM"justMyCode": false
Aaron Hoffer
05/02/2022, 5:41 PMKeith Gross
05/02/2022, 5:42 PM{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Dagit",
"type": "python",
"request": "launch",
"module": "dagit",
"cwd": "${workspaceFolder}",
"args": [
"-f",
"repo.py"
],
"console": "integratedTerminal"
}
]
}
alex
05/02/2022, 5:47 PMI’m triggering the job from a sensorthis goes through the daemon which doesn’t route anything through dagit, in the local case it has its own subprocess grpc server
dagster sensor preview
shown earlier in this thread
• manually run the grpc server (via vscode) and change your workspace to point that directly
• try to reproduce in a test context https://docs.dagster.io/concepts/partitions-schedules-sensors/sensors#testing-sensorsAaron Hoffer
05/02/2022, 6:07 PMuseThis worked, but only with breakpoints within the sensorshown earlier in this threaddagster sensor preview
run daemon via vscodeNot sure what you mean by this, from above it sounded like you can’t run a debugger on the daemon itself. I’d also be ok using
breakpoint()
in places but that just causes the job to error when run.alex
05/02/2022, 6:35 PMAaron Hoffer
05/02/2022, 6:48 PM