From 42678a3a706ac225a412243adc3fde6de3796ab0 Mon Sep 17 00:00:00 2001 From: David Vo Date: Sun, 14 Jan 2024 17:37:55 +1100 Subject: [PATCH] Add VSCode config --- .vscode/extensions.json | 5 +++++ .vscode/launch.json | 39 ++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 47 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..5d21c814 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "charliermarsh.ruff" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..fef20a1c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,39 @@ +{ + // 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", + "configurations": [ + { + "name": "RobotPy: Simulate", + "type": "python", + "request": "launch", + "module": "robotpy", + "args": [ + "sim" + ] + }, + { + "name": "RobotPy: Test", + "type": "python", + "request": "launch", + "module": "robotpy", + "args": [ + "test" + ] + }, + { + "name": "Python: Attach to roboRIO", + "type": "python", + "request": "attach", + "port": 5678, + "host": "10.47.74.2", + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "." + } + ] + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..538a127f --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,47 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "deploy with netconsole", + "type": "process", + "group": "build", + "command": "${command:python.interpreterPath}", + "args": [ + "-m", + "robotpy", + "deploy", + "--nc" + ] + }, + { + "label": "deploy", + "type": "process", + "group":{ + "kind": "build", + "isDefault": true + }, + "command": "${command:python.interpreterPath}", + "args": [ + "-m", + "robotpy", + "deploy" + ] + }, + { + "label": "test", + "type": "process", + "group": { + "kind": "test", + "isDefault": true + }, + "command": "${command:python.interpreterPath}", + "args": [ + "-m", + "robotpy", + "test" + ] + } + ] +}