No bug - Add debugging instructions to taskgraph r=ahal
authorHeitor Neiva <>
Thu, 10 Mar 2022 16:55:35 +0000
changeset 377 7b7896f91ab143b50abca193eca35080e6066775
parent 376 c09d423fee392358d93d4a18936b98c6621c66cf
child 378 c4ff8eacd952b69da5a3141df9177d74fe764192
push id204
push dateThu, 10 Mar 2022 16:57:40 +0000
treeherdertaskgraph@7b7896f91ab1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
No bug - Add debugging instructions to taskgraph r=ahal Differential Revision:
--- a/docs/howto/debugging_and_testing.rst
+++ b/docs/howto/debugging_and_testing.rst
@@ -25,16 +25,40 @@ errors if you are missing required attri
 One of the most useful aspects of this command, is that you can use it to verify that you are generating the 
 correct graph of tasks by changing the `target_tasks_method` from `default` to `release` or `nightly` (assuming you have this type of support already set up).
 You can also use the `--diff` flag to generate and view diffs (as json blobs) of multiple taskgraphs e.g. github releases, [nightly] cron, [release promotion] actions, github-push, and pull-requests and see
 exactly what the differences are. This can be useful to track down an issue where, for example, github releases is broken but everything else is running smoothly, and to verify that any fix you
 make to the release graph hasn't broken something in the other graphs. If you want to diff against multiple parameters at a time, simply pass `--parameters` multiple times (or pass a directory containing parameters files).
+Step-debugging through functions can be the fastest way to troubleshoot problems. Besides using `pdb`, you may want to have your IDE as a debugger for setting breakpoints and use it's UI for controlling the debug session.
+In VSCode, you can achieve it with the following configuration:
+.. code-block::
+  {
+      "name": "Taskgraph Full",
+      "type": "python",
+      "request": "launch",
+      "program": "/Users/myuser/.pyenv/versions/projectname/bin/taskgraph",
+      "args": ["full", "-p", "taskcluster/test/params/main-push.yml"],
+      "console": "integratedTerminal",
+      "justMyCode": false
+  }
+`Note: You should adjust "program" as needed. To find the taskgraph executable when using pyenv, use the following:`
+.. code::
+  pyenv which taskgraph
 Retriggering and Rerunning Tasks
 These can either be triggered in the Taskcluster UI (by clicking into the appropriate task, and hoovering over the bubble in the bottom right corner), via the Taskcluster CLI
 or in the Treeherder UI (currently only pushes on `main` and `master` are consumed and displayed).
 Staging Repositories