diff --git a/template_content/README.md.jinja b/template_content/README.md.jinja index 05a9b1b3..88b4c3f7 100644 --- a/template_content/README.md.jinja +++ b/template_content/README.md.jinja @@ -59,6 +59,9 @@ Refer to the commented header in the `__main__.py` file in the `smart_contracts` {%- elif deployment_language == 'typescript' %} Refer to the commented header in the `index.ts` file in the `smart_contracts` folder. {%- endif %} + +If you have opted in to include VSCode launch configurations in your project, you can also use the `Debug TEAL via AlgoKit AVM Debugger` launch configuration to interactively select an available trace file and launch the debug session for your smart contract. + For information on using and setting up the `AlgoKit AVM Debugger` VSCode extension refer [here](https://github.com/algorandfoundation/algokit-avm-vscode-debugger). #### Setting up GitHub for CI/CD workflow and TestNet deployment diff --git a/template_content/smart_contracts/{% if deployment_language == 'typescript' %}index.ts{% endif %}.jinja b/template_content/smart_contracts/{% if deployment_language == 'typescript' %}index.ts{% endif %}.jinja index 4f18d4df..de72c35b 100644 --- a/template_content/smart_contracts/{% if deployment_language == 'typescript' %}index.ts{% endif %}.jinja +++ b/template_content/smart_contracts/{% if deployment_language == 'typescript' %}index.ts{% endif %}.jinja @@ -3,8 +3,13 @@ import * as path from 'path' import { consoleLogger } from '@algorandfoundation/algokit-utils/types/logging' import * as algokit from '@algorandfoundation/algokit-utils' +# # Uncomment the debug and traceAll options to enable auto generation of AVM Debugger compliant sourceMap and simulation trace file. +# # Learn more about using AlgoKit AVM Debugger to debug your TEAL source codes and inspect varioud kidns of Algorand transactions in atomic groups -> https://github.com/algorandfoundation/algokit-avm-vscode-Debugger + algokit.Config.configure({ logger: consoleLogger, + # debug: true, + # traceAll: true, }) // base directory diff --git a/template_content/{% if ide_vscode %}.tours{% endif %}/getting-started-with-your-algokit-project.tour b/template_content/{% if ide_vscode %}.tours{% endif %}/getting-started-with-your-algokit-project.tour.jinja similarity index 97% rename from template_content/{% if ide_vscode %}.tours{% endif %}/getting-started-with-your-algokit-project.tour rename to template_content/{% if ide_vscode %}.tours{% endif %}/getting-started-with-your-algokit-project.tour.jinja index 3b699e31..500747f5 100644 --- a/template_content/{% if ide_vscode %}.tours{% endif %}/getting-started-with-your-algokit-project.tour +++ b/template_content/{% if ide_vscode %}.tours{% endif %}/getting-started-with-your-algokit-project.tour.jinja @@ -48,7 +48,7 @@ "line": 3 }, { - "file": "smart_contracts/__main__.py", + "file": "smart_contracts/{% if deployment_language == 'python' %}__main__.py{% else %}index.ts{% endif %}", "description": "Uncomment the following lines to enable complementary utilities that will generate artifacts required for the [AlgoKit AVM Debugger](https://github.com/algorandfoundation/algokit-avm-vscode-debugger) VSCode plugin. A new folder will be automatically created in the `.algokit` directory with source maps of all TEAL contracts in this workspace, as well as traces that will appear in a folder at the root of the workspace. You can then use the traces as entry points to trigger the debug extension. Make sure to have the `.algokit.toml` file available at the root of the workspace.", "line": 13 } diff --git a/template_content/{% if ide_vscode %}.vscode{% endif %}/extensions.json.jinja b/template_content/{% if ide_vscode %}.vscode{% endif %}/extensions.json.jinja index 1b57e20a..7c515dcb 100644 --- a/template_content/{% if ide_vscode %}.vscode{% endif %}/extensions.json.jinja +++ b/template_content/{% if ide_vscode %}.vscode{% endif %}/extensions.json.jinja @@ -17,6 +17,7 @@ {% endif -%} "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/template_content/{% if ide_vscode %}.vscode{% endif %}/launch.json.jinja b/template_content/{% if ide_vscode %}.vscode{% endif %}/launch.json.jinja index 4b88a5cf..ac48af26 100644 --- a/template_content/{% if ide_vscode %}.vscode{% endif %}/launch.json.jinja +++ b/template_content/{% if ide_vscode %}.vscode{% endif %}/launch.json.jinja @@ -52,6 +52,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_default_parameters/.vscode/extensions.json b/tests_generated/test_default_parameters/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_default_parameters/.vscode/extensions.json +++ b/tests_generated/test_default_parameters/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_default_parameters/.vscode/launch.json b/tests_generated/test_default_parameters/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_default_parameters/.vscode/launch.json +++ b/tests_generated/test_default_parameters/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_deployment_language-python/.vscode/extensions.json b/tests_generated/test_deployment_language-python/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_deployment_language-python/.vscode/extensions.json +++ b/tests_generated/test_deployment_language-python/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_deployment_language-python/.vscode/launch.json b/tests_generated/test_deployment_language-python/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_deployment_language-python/.vscode/launch.json +++ b/tests_generated/test_deployment_language-python/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_deployment_language-typescript/.tours/getting-started-with-your-algokit-project.tour b/tests_generated/test_deployment_language-typescript/.tours/getting-started-with-your-algokit-project.tour index 3b699e31..f6d6cfc1 100644 --- a/tests_generated/test_deployment_language-typescript/.tours/getting-started-with-your-algokit-project.tour +++ b/tests_generated/test_deployment_language-typescript/.tours/getting-started-with-your-algokit-project.tour @@ -48,7 +48,7 @@ "line": 3 }, { - "file": "smart_contracts/__main__.py", + "file": "smart_contracts/index.ts", "description": "Uncomment the following lines to enable complementary utilities that will generate artifacts required for the [AlgoKit AVM Debugger](https://github.com/algorandfoundation/algokit-avm-vscode-debugger) VSCode plugin. A new folder will be automatically created in the `.algokit` directory with source maps of all TEAL contracts in this workspace, as well as traces that will appear in a folder at the root of the workspace. You can then use the traces as entry points to trigger the debug extension. Make sure to have the `.algokit.toml` file available at the root of the workspace.", "line": 13 } diff --git a/tests_generated/test_deployment_language-typescript/.vscode/extensions.json b/tests_generated/test_deployment_language-typescript/.vscode/extensions.json index 3338991c..82ac902d 100644 --- a/tests_generated/test_deployment_language-typescript/.vscode/extensions.json +++ b/tests_generated/test_deployment_language-typescript/.vscode/extensions.json @@ -5,6 +5,7 @@ "esbenp.prettier-vscode", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_deployment_language-typescript/.vscode/launch.json b/tests_generated/test_deployment_language-typescript/.vscode/launch.json index 4ccd8e12..f1ace7ca 100644 --- a/tests_generated/test_deployment_language-typescript/.vscode/launch.json +++ b/tests_generated/test_deployment_language-typescript/.vscode/launch.json @@ -31,6 +31,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_deployment_language-typescript/smart_contracts/index.ts b/tests_generated/test_deployment_language-typescript/smart_contracts/index.ts index 4f18d4df..de72c35b 100644 --- a/tests_generated/test_deployment_language-typescript/smart_contracts/index.ts +++ b/tests_generated/test_deployment_language-typescript/smart_contracts/index.ts @@ -3,8 +3,13 @@ import * as path from 'path' import { consoleLogger } from '@algorandfoundation/algokit-utils/types/logging' import * as algokit from '@algorandfoundation/algokit-utils' +# # Uncomment the debug and traceAll options to enable auto generation of AVM Debugger compliant sourceMap and simulation trace file. +# # Learn more about using AlgoKit AVM Debugger to debug your TEAL source codes and inspect varioud kidns of Algorand transactions in atomic groups -> https://github.com/algorandfoundation/algokit-avm-vscode-Debugger + algokit.Config.configure({ logger: consoleLogger, + # debug: true, + # traceAll: true, }) // base directory diff --git a/tests_generated/test_ide_jetbrains-False/.vscode/extensions.json b/tests_generated/test_ide_jetbrains-False/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_ide_jetbrains-False/.vscode/extensions.json +++ b/tests_generated/test_ide_jetbrains-False/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_ide_jetbrains-False/.vscode/launch.json b/tests_generated/test_ide_jetbrains-False/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_ide_jetbrains-False/.vscode/launch.json +++ b/tests_generated/test_ide_jetbrains-False/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_ide_jetbrains-True/.vscode/extensions.json b/tests_generated/test_ide_jetbrains-True/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_ide_jetbrains-True/.vscode/extensions.json +++ b/tests_generated/test_ide_jetbrains-True/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_ide_jetbrains-True/.vscode/launch.json b/tests_generated/test_ide_jetbrains-True/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_ide_jetbrains-True/.vscode/launch.json +++ b/tests_generated/test_ide_jetbrains-True/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_ide_vscode-True/.vscode/extensions.json b/tests_generated/test_ide_vscode-True/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_ide_vscode-True/.vscode/extensions.json +++ b/tests_generated/test_ide_vscode-True/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_ide_vscode-True/.vscode/launch.json b/tests_generated/test_ide_vscode-True/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_ide_vscode-True/.vscode/launch.json +++ b/tests_generated/test_ide_vscode-True/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_preset_name-production/.vscode/extensions.json b/tests_generated/test_preset_name-production/.vscode/extensions.json index 8e059e6c..a9246d15 100644 --- a/tests_generated/test_preset_name-production/.vscode/extensions.json +++ b/tests_generated/test_preset_name-production/.vscode/extensions.json @@ -6,6 +6,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_preset_name-production/.vscode/launch.json b/tests_generated/test_preset_name-production/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_preset_name-production/.vscode/launch.json +++ b/tests_generated/test_preset_name-production/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_preset_name-production/README.md b/tests_generated/test_preset_name-production/README.md index dc511a09..756347ce 100644 --- a/tests_generated/test_preset_name-production/README.md +++ b/tests_generated/test_preset_name-production/README.md @@ -49,6 +49,9 @@ This project uses [GitHub Actions](https://docs.github.com/en/actions/learn-gith This project is optimized to work with AlgoKit AVM Debugger extension. To activate it: Refer to the commented header in the `__main__.py` file in the `smart_contracts` folder. + +If you have opted in to include VSCode launch configurations in your project, you can also use the `Debug TEAL via AlgoKit AVM Debugger` launch configuration to interactively select an available trace file and launch the debug session for your smart contract. + For information on using and setting up the `AlgoKit AVM Debugger` VSCode extension refer [here](https://github.com/algorandfoundation/algokit-avm-vscode-debugger). #### Setting up GitHub for CI/CD workflow and TestNet deployment diff --git a/tests_generated/test_preset_name-starter/.vscode/extensions.json b/tests_generated/test_preset_name-starter/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_preset_name-starter/.vscode/extensions.json +++ b/tests_generated/test_preset_name-starter/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_preset_name-starter/.vscode/launch.json b/tests_generated/test_preset_name-starter/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_preset_name-starter/.vscode/launch.json +++ b/tests_generated/test_preset_name-starter/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_python_linter-flake8/.vscode/extensions.json b/tests_generated/test_python_linter-flake8/.vscode/extensions.json index db541bf5..96b55b09 100644 --- a/tests_generated/test_python_linter-flake8/.vscode/extensions.json +++ b/tests_generated/test_python_linter-flake8/.vscode/extensions.json @@ -5,6 +5,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_python_linter-flake8/.vscode/launch.json b/tests_generated/test_python_linter-flake8/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_python_linter-flake8/.vscode/launch.json +++ b/tests_generated/test_python_linter-flake8/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_python_linter-none/.vscode/extensions.json b/tests_generated/test_python_linter-none/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_python_linter-none/.vscode/extensions.json +++ b/tests_generated/test_python_linter-none/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_python_linter-none/.vscode/launch.json b/tests_generated/test_python_linter-none/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_python_linter-none/.vscode/launch.json +++ b/tests_generated/test_python_linter-none/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_python_linter-ruff/.vscode/extensions.json b/tests_generated/test_python_linter-ruff/.vscode/extensions.json index 5ef6324a..2e0b6f26 100644 --- a/tests_generated/test_python_linter-ruff/.vscode/extensions.json +++ b/tests_generated/test_python_linter-ruff/.vscode/extensions.json @@ -5,6 +5,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_python_linter-ruff/.vscode/launch.json b/tests_generated/test_python_linter-ruff/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_python_linter-ruff/.vscode/launch.json +++ b/tests_generated/test_python_linter-ruff/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_smart_contract_generator_default_production_preset_python/.vscode/extensions.json b/tests_generated/test_smart_contract_generator_default_production_preset_python/.vscode/extensions.json index 8e059e6c..a9246d15 100644 --- a/tests_generated/test_smart_contract_generator_default_production_preset_python/.vscode/extensions.json +++ b/tests_generated/test_smart_contract_generator_default_production_preset_python/.vscode/extensions.json @@ -6,6 +6,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_smart_contract_generator_default_production_preset_python/.vscode/launch.json b/tests_generated/test_smart_contract_generator_default_production_preset_python/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_smart_contract_generator_default_production_preset_python/.vscode/launch.json +++ b/tests_generated/test_smart_contract_generator_default_production_preset_python/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_smart_contract_generator_default_production_preset_python/README.md b/tests_generated/test_smart_contract_generator_default_production_preset_python/README.md index 00162683..dcd05188 100644 --- a/tests_generated/test_smart_contract_generator_default_production_preset_python/README.md +++ b/tests_generated/test_smart_contract_generator_default_production_preset_python/README.md @@ -49,6 +49,9 @@ This project uses [GitHub Actions](https://docs.github.com/en/actions/learn-gith This project is optimized to work with AlgoKit AVM Debugger extension. To activate it: Refer to the commented header in the `__main__.py` file in the `smart_contracts` folder. + +If you have opted in to include VSCode launch configurations in your project, you can also use the `Debug TEAL via AlgoKit AVM Debugger` launch configuration to interactively select an available trace file and launch the debug session for your smart contract. + For information on using and setting up the `AlgoKit AVM Debugger` VSCode extension refer [here](https://github.com/algorandfoundation/algokit-avm-vscode-debugger). #### Setting up GitHub for CI/CD workflow and TestNet deployment diff --git a/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.tours/getting-started-with-your-algokit-project.tour b/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.tours/getting-started-with-your-algokit-project.tour index 3b699e31..f6d6cfc1 100644 --- a/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.tours/getting-started-with-your-algokit-project.tour +++ b/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.tours/getting-started-with-your-algokit-project.tour @@ -48,7 +48,7 @@ "line": 3 }, { - "file": "smart_contracts/__main__.py", + "file": "smart_contracts/index.ts", "description": "Uncomment the following lines to enable complementary utilities that will generate artifacts required for the [AlgoKit AVM Debugger](https://github.com/algorandfoundation/algokit-avm-vscode-debugger) VSCode plugin. A new folder will be automatically created in the `.algokit` directory with source maps of all TEAL contracts in this workspace, as well as traces that will appear in a folder at the root of the workspace. You can then use the traces as entry points to trigger the debug extension. Make sure to have the `.algokit.toml` file available at the root of the workspace.", "line": 13 } diff --git a/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.vscode/extensions.json b/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.vscode/extensions.json index 5c13dde3..f6865b0d 100644 --- a/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.vscode/extensions.json +++ b/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.vscode/extensions.json @@ -7,6 +7,7 @@ "esbenp.prettier-vscode", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.vscode/launch.json b/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.vscode/launch.json index 4ccd8e12..f1ace7ca 100644 --- a/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.vscode/launch.json +++ b/tests_generated/test_smart_contract_generator_default_production_preset_typescript/.vscode/launch.json @@ -31,6 +31,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_smart_contract_generator_default_production_preset_typescript/README.md b/tests_generated/test_smart_contract_generator_default_production_preset_typescript/README.md index 6e527466..60d6bed9 100644 --- a/tests_generated/test_smart_contract_generator_default_production_preset_typescript/README.md +++ b/tests_generated/test_smart_contract_generator_default_production_preset_typescript/README.md @@ -50,6 +50,9 @@ This project uses [GitHub Actions](https://docs.github.com/en/actions/learn-gith This project is optimized to work with AlgoKit AVM Debugger extension. To activate it: Refer to the commented header in the `index.ts` file in the `smart_contracts` folder. + +If you have opted in to include VSCode launch configurations in your project, you can also use the `Debug TEAL via AlgoKit AVM Debugger` launch configuration to interactively select an available trace file and launch the debug session for your smart contract. + For information on using and setting up the `AlgoKit AVM Debugger` VSCode extension refer [here](https://github.com/algorandfoundation/algokit-avm-vscode-debugger). #### Setting up GitHub for CI/CD workflow and TestNet deployment diff --git a/tests_generated/test_smart_contract_generator_default_production_preset_typescript/smart_contracts/index.ts b/tests_generated/test_smart_contract_generator_default_production_preset_typescript/smart_contracts/index.ts index 4f18d4df..de72c35b 100644 --- a/tests_generated/test_smart_contract_generator_default_production_preset_typescript/smart_contracts/index.ts +++ b/tests_generated/test_smart_contract_generator_default_production_preset_typescript/smart_contracts/index.ts @@ -3,8 +3,13 @@ import * as path from 'path' import { consoleLogger } from '@algorandfoundation/algokit-utils/types/logging' import * as algokit from '@algorandfoundation/algokit-utils' +# # Uncomment the debug and traceAll options to enable auto generation of AVM Debugger compliant sourceMap and simulation trace file. +# # Learn more about using AlgoKit AVM Debugger to debug your TEAL source codes and inspect varioud kidns of Algorand transactions in atomic groups -> https://github.com/algorandfoundation/algokit-avm-vscode-Debugger + algokit.Config.configure({ logger: consoleLogger, + # debug: true, + # traceAll: true, }) // base directory diff --git a/tests_generated/test_smart_contract_generator_default_starter_preset_python/.vscode/extensions.json b/tests_generated/test_smart_contract_generator_default_starter_preset_python/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_smart_contract_generator_default_starter_preset_python/.vscode/extensions.json +++ b/tests_generated/test_smart_contract_generator_default_starter_preset_python/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_smart_contract_generator_default_starter_preset_python/.vscode/launch.json b/tests_generated/test_smart_contract_generator_default_starter_preset_python/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_smart_contract_generator_default_starter_preset_python/.vscode/launch.json +++ b/tests_generated/test_smart_contract_generator_default_starter_preset_python/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.tours/getting-started-with-your-algokit-project.tour b/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.tours/getting-started-with-your-algokit-project.tour index 3b699e31..f6d6cfc1 100644 --- a/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.tours/getting-started-with-your-algokit-project.tour +++ b/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.tours/getting-started-with-your-algokit-project.tour @@ -48,7 +48,7 @@ "line": 3 }, { - "file": "smart_contracts/__main__.py", + "file": "smart_contracts/index.ts", "description": "Uncomment the following lines to enable complementary utilities that will generate artifacts required for the [AlgoKit AVM Debugger](https://github.com/algorandfoundation/algokit-avm-vscode-debugger) VSCode plugin. A new folder will be automatically created in the `.algokit` directory with source maps of all TEAL contracts in this workspace, as well as traces that will appear in a folder at the root of the workspace. You can then use the traces as entry points to trigger the debug extension. Make sure to have the `.algokit.toml` file available at the root of the workspace.", "line": 13 } diff --git a/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.vscode/extensions.json b/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.vscode/extensions.json index 3338991c..82ac902d 100644 --- a/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.vscode/extensions.json +++ b/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.vscode/extensions.json @@ -5,6 +5,7 @@ "esbenp.prettier-vscode", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.vscode/launch.json b/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.vscode/launch.json index 4ccd8e12..f1ace7ca 100644 --- a/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.vscode/launch.json +++ b/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/.vscode/launch.json @@ -31,6 +31,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/smart_contracts/index.ts b/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/smart_contracts/index.ts index 4f18d4df..de72c35b 100644 --- a/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/smart_contracts/index.ts +++ b/tests_generated/test_smart_contract_generator_default_starter_preset_typescript/smart_contracts/index.ts @@ -3,8 +3,13 @@ import * as path from 'path' import { consoleLogger } from '@algorandfoundation/algokit-utils/types/logging' import * as algokit from '@algorandfoundation/algokit-utils' +# # Uncomment the debug and traceAll options to enable auto generation of AVM Debugger compliant sourceMap and simulation trace file. +# # Learn more about using AlgoKit AVM Debugger to debug your TEAL source codes and inspect varioud kidns of Algorand transactions in atomic groups -> https://github.com/algorandfoundation/algokit-avm-vscode-Debugger + algokit.Config.configure({ logger: consoleLogger, + # debug: true, + # traceAll: true, }) // base directory diff --git a/tests_generated/test_use_github_actions-False/.vscode/extensions.json b/tests_generated/test_use_github_actions-False/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_use_github_actions-False/.vscode/extensions.json +++ b/tests_generated/test_use_github_actions-False/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_use_github_actions-False/.vscode/launch.json b/tests_generated/test_use_github_actions-False/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_use_github_actions-False/.vscode/launch.json +++ b/tests_generated/test_use_github_actions-False/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_use_github_actions-True/.vscode/extensions.json b/tests_generated/test_use_github_actions-True/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_use_github_actions-True/.vscode/extensions.json +++ b/tests_generated/test_use_github_actions-True/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_use_github_actions-True/.vscode/launch.json b/tests_generated/test_use_github_actions-True/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_use_github_actions-True/.vscode/launch.json +++ b/tests_generated/test_use_github_actions-True/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_use_github_actions-True/README.md b/tests_generated/test_use_github_actions-True/README.md index afe982db..e9378128 100644 --- a/tests_generated/test_use_github_actions-True/README.md +++ b/tests_generated/test_use_github_actions-True/README.md @@ -49,6 +49,9 @@ This project uses [GitHub Actions](https://docs.github.com/en/actions/learn-gith This project is optimized to work with AlgoKit AVM Debugger extension. To activate it: Refer to the commented header in the `__main__.py` file in the `smart_contracts` folder. + +If you have opted in to include VSCode launch configurations in your project, you can also use the `Debug TEAL via AlgoKit AVM Debugger` launch configuration to interactively select an available trace file and launch the debug session for your smart contract. + For information on using and setting up the `AlgoKit AVM Debugger` VSCode extension refer [here](https://github.com/algorandfoundation/algokit-avm-vscode-debugger). #### Setting up GitHub for CI/CD workflow and TestNet deployment diff --git a/tests_generated/test_use_python_black-False/.vscode/extensions.json b/tests_generated/test_use_python_black-False/.vscode/extensions.json index 312aae99..0452b175 100644 --- a/tests_generated/test_use_python_black-False/.vscode/extensions.json +++ b/tests_generated/test_use_python_black-False/.vscode/extensions.json @@ -3,6 +3,7 @@ "ms-python.python", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_use_python_black-False/.vscode/launch.json b/tests_generated/test_use_python_black-False/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_use_python_black-False/.vscode/launch.json +++ b/tests_generated/test_use_python_black-False/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_use_python_black-True/.vscode/extensions.json b/tests_generated/test_use_python_black-True/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_use_python_black-True/.vscode/extensions.json +++ b/tests_generated/test_use_python_black-True/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_use_python_black-True/.vscode/launch.json b/tests_generated/test_use_python_black-True/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_use_python_black-True/.vscode/launch.json +++ b/tests_generated/test_use_python_black-True/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_use_python_mypy-False/.vscode/extensions.json b/tests_generated/test_use_python_mypy-False/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_use_python_mypy-False/.vscode/extensions.json +++ b/tests_generated/test_use_python_mypy-False/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_use_python_mypy-False/.vscode/launch.json b/tests_generated/test_use_python_mypy-False/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_use_python_mypy-False/.vscode/launch.json +++ b/tests_generated/test_use_python_mypy-False/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_use_python_mypy-True/.vscode/extensions.json b/tests_generated/test_use_python_mypy-True/.vscode/extensions.json index 6794e940..0d5bc420 100644 --- a/tests_generated/test_use_python_mypy-True/.vscode/extensions.json +++ b/tests_generated/test_use_python_mypy-True/.vscode/extensions.json @@ -5,6 +5,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_use_python_mypy-True/.vscode/launch.json b/tests_generated/test_use_python_mypy-True/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_use_python_mypy-True/.vscode/launch.json +++ b/tests_generated/test_use_python_mypy-True/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_use_python_pytest-False/.vscode/extensions.json b/tests_generated/test_use_python_pytest-False/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_use_python_pytest-False/.vscode/extensions.json +++ b/tests_generated/test_use_python_pytest-False/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_use_python_pytest-False/.vscode/launch.json b/tests_generated/test_use_python_pytest-False/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_use_python_pytest-False/.vscode/launch.json +++ b/tests_generated/test_use_python_pytest-False/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] } diff --git a/tests_generated/test_use_python_pytest-True/.vscode/extensions.json b/tests_generated/test_use_python_pytest-True/.vscode/extensions.json index cae4a70f..895fe092 100644 --- a/tests_generated/test_use_python_pytest-True/.vscode/extensions.json +++ b/tests_generated/test_use_python_pytest-True/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.black-formatter", "tamasfe.even-better-toml", "editorconfig.editorconfig", - "vsls-contrib.codetour" + "vsls-contrib.codetour", + "algorand foundation.algokit-avm-vscode-debugger" ] } diff --git a/tests_generated/test_use_python_pytest-True/.vscode/launch.json b/tests_generated/test_use_python_pytest-True/.vscode/launch.json index 8a39d265..1f1f192d 100644 --- a/tests_generated/test_use_python_pytest-True/.vscode/launch.json +++ b/tests_generated/test_use_python_pytest-True/.vscode/launch.json @@ -26,6 +26,13 @@ "module": "smart_contracts", "args": ["build"], "cwd": "${workspaceFolder}" + }, + { + "type": "avm", + "request": "launch", + "name": "Debug TEAL via AlgoKit AVM Debugger", + "simulateTraceFile": "${workspaceFolder}/${command:PickSimulateTraceFile}", + "stopOnEntry": true } ] }