Skip to content

Commit

Permalink
add launch.json for debugging the code within vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
Obijuan committed Feb 21, 2024
1 parent 27f7d10 commit f95fda1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
.tox/
.cache/
.pytest_cache/
.vscode/
.venv/
build/
dist/
Expand Down
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Apio build",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"args": ["build"],
"console": "internalConsole",
"justMyCode": true,
//-- Change to the folder with the example to test
"cwd": "${workspaceFolder}/test-examples/Alhambra-II/ledon"
}
]
}
7 changes: 6 additions & 1 deletion apio_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
from apio.__main__ import cli as apio

#-- Run apio!
apio(None)
try:
apio(None)

#-- Apio commands finish with this excepcion
except SystemExit:
print("Apio command executed!")

#-- Exit!
sys.exit()

0 comments on commit f95fda1

Please sign in to comment.