Skip to content

Instantly share code, notes, and snippets.

@ajkerrigan
Created June 4, 2020 05:08
Show Gist options
  • Select an option

  • Save ajkerrigan/2ceac22cabc51d04e17406ef079f02db to your computer and use it in GitHub Desktop.

Select an option

Save ajkerrigan/2ceac22cabc51d04e17406ef079f02db to your computer and use it in GitHub Desktop.
Some VS Code settings for debugging VisiData

VS Code's Python extension does a lovely job of debugging VisiData. I run it one of two ways:

  • When I'm working on a specific task, I add a specific run string to launch.json to start it. I typically run VisiData inside the integrated terminal.
  • For more ad-hoc/exploratory stuff, I'll start VisiData from tmux and use VS Code's process picker to attach it.

Key pieces that need to be in place for this to work:

  • Have VisiData and all dependencies installed into a virtual environment, and activate that virtual environment in VS Code.
  • Make sure VisiData is installed with -e so your breakpoints work.
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: vd undo testing",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/bin/vd",
"args": [
"-p",
"py-ctx-mgrs3.vd"
],
"console": "integratedTerminal"
},
{
"name": "Python: vd big jsonl",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/bin/vd",
"args": [
"-f",
"pandas",
"~/code/ctxmgr-analysis/py-ctx-mgrs3.jsonl"
],
"console": "integratedTerminal"
},
{
"name": "Python: vd",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/bin/vd",
"args": [
"-f",
"pandas",
"sample_data/benchmark.csv"
],
"console": "integratedTerminal"
},
{
"name": "Python: vd attach",
"type": "python",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment