openpilot
openpilot copied to clipboard
Generate debugging launch.json for all openpilot processes
Run tools/vscode_debug/generate_vscode_debug_launch.py
to automatically populate the launch.json file with all the openpilot processes. It also supports default arguments for debugging and environment variables.
Generating does not delete your existing launch.json, it will rename it.
It looks like you didn't use one of the Pull Request templates. Please check the contributing docs. Also make sure that you didn't modify any of the checkboxes or headings within the template.
I don't use VSCode but this seems useful for those who do. However, this is way too many lines, and seems to require the user knows about this and runs it?
Is there a way for VSCode to generate these automatically if you open the project?
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"inputs": [
{
"id": "python_process",
"type": "pickString",
"description": "Select the process to debug",
"options": [
"selfdrive/controls/controlsd.py",
"system/timed/timed.py"
],
},
{
"id": "args",
"description": "Arguments to pass to the process",
"type": "promptString"
}
],
"configurations": [
{
"name": "Python: Openpilot Process",
"type": "debugpy",
"request": "launch",
"program": "${input:python_process}",
"console": "integratedTerminal",
"justMyCode": true,
"args": "${input:args}"
}
]
}
something like this would be simpler
I don't use VSCode but this seems useful for those who do.
I'm curious. It's there a standard ide setup that comma employees use?
I'm curious. It's there a standard ide setup that comma employees use?
no, everyone can use their own preferred ide. though we would like to make vscode a decent experience since we support devcontainers
I think trying to copy the setup from the main vscode repo here would make sense. They have the vscode folder checked in with launch configs that work with their devcontainer. If we can do something like it suggested above in this comment where we have 1 config for cpp and 1 for python that would be ideal. https://github.com/commaai/openpilot/pull/31197#issuecomment-1924539753.
Closing, feel free to open a cleaner version of this.