|
| 1 | +{ |
| 2 | + // Use IntelliSense to learn about possible attributes. |
| 3 | + // Hover to view descriptions of existing attributes. |
| 4 | + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 |
| 5 | + "version": "0.2.0", |
| 6 | + "configurations": [ |
| 7 | + { |
| 8 | + "name": "Python Debugger: Current File", |
| 9 | + "type": "debugpy", |
| 10 | + "request": "launch", |
| 11 | + "program": "${file}", |
| 12 | + "console": "integratedTerminal" |
| 13 | + }, |
| 14 | + { |
| 15 | + "name": "Debug: All Tests (pytest)", |
| 16 | + "type": "debugpy", |
| 17 | + "request": "launch", |
| 18 | + "module": "pytest", |
| 19 | + "args": [ |
| 20 | + "tests/", |
| 21 | + "-v", |
| 22 | + "--tb=short" |
| 23 | + ], |
| 24 | + "console": "integratedTerminal", |
| 25 | + "cwd": "${workspaceFolder}", |
| 26 | + "env": { |
| 27 | + "PYTHONPATH": "${workspaceFolder}" |
| 28 | + }, |
| 29 | + "justMyCode": false |
| 30 | + }, |
| 31 | + { |
| 32 | + "name": "Debug: Current Test File (pytest)", |
| 33 | + "type": "debugpy", |
| 34 | + "request": "launch", |
| 35 | + "module": "pytest", |
| 36 | + "args": [ |
| 37 | + "${file}", |
| 38 | + "-v", |
| 39 | + "--tb=short" |
| 40 | + ], |
| 41 | + "console": "integratedTerminal", |
| 42 | + "cwd": "${workspaceFolder}", |
| 43 | + "env": { |
| 44 | + "PYTHONPATH": "${workspaceFolder}" |
| 45 | + }, |
| 46 | + "justMyCode": false |
| 47 | + }, |
| 48 | + { |
| 49 | + "name": "Debug: Specific Test Function", |
| 50 | + "type": "debugpy", |
| 51 | + "request": "launch", |
| 52 | + "module": "pytest", |
| 53 | + "args": [ |
| 54 | + "${file}::${input:testFunction}", |
| 55 | + "-v", |
| 56 | + "--tb=short" |
| 57 | + ], |
| 58 | + "console": "integratedTerminal", |
| 59 | + "cwd": "${workspaceFolder}", |
| 60 | + "env": { |
| 61 | + "PYTHONPATH": "${workspaceFolder}" |
| 62 | + }, |
| 63 | + "justMyCode": false |
| 64 | + }, |
| 65 | + { |
| 66 | + "name": "Debug: Unit Tests Only", |
| 67 | + "type": "debugpy", |
| 68 | + "request": "launch", |
| 69 | + "module": "pytest", |
| 70 | + "args": [ |
| 71 | + "tests/unit/", |
| 72 | + "-v", |
| 73 | + "--tb=short" |
| 74 | + ], |
| 75 | + "console": "integratedTerminal", |
| 76 | + "cwd": "${workspaceFolder}", |
| 77 | + "env": { |
| 78 | + "PYTHONPATH": "${workspaceFolder}" |
| 79 | + }, |
| 80 | + "justMyCode": false |
| 81 | + } |
| 82 | + ], |
| 83 | + "inputs": [ |
| 84 | + { |
| 85 | + "id": "testFunction", |
| 86 | + "description": "Enter the test function name (e.g., TestClass::test_method or test_function)", |
| 87 | + "default": "", |
| 88 | + "type": "promptString" |
| 89 | + } |
| 90 | + ] |
| 91 | +} |
0 commit comments