From 78bc0fe849587b3ba7be811346f8aa0f990c691b Mon Sep 17 00:00:00 2001 From: "EventHelix.com Inc" Date: Sun, 16 Dec 2018 11:50:15 -0500 Subject: [PATCH] Defined vscode debugger configuration --- .vscode/launch.json | 65 +++++++++++++++++++++++++++++++++++++++++++++ config.py | 2 +- funutils.py | 2 +- 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..f139e74 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,65 @@ +{ + // 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": "Python: Current File (Integrated Terminal)", + "type": "python", + "request": "launch", + "program": "${file}", + "args": ["-i", "sample_trace.txt"], + "console": "integratedTerminal" + }, + { + "name": "Python: Attach", + "type": "python", + "request": "attach", + "port": 5678, + "host": "localhost" + }, + { + "name": "Python: Module", + "type": "python", + "request": "launch", + "module": "enter-your-module-name-here", + "console": "integratedTerminal" + }, + { + "name": "Python: Django", + "type": "python", + "request": "launch", + "program": "${workspaceFolder}/manage.py", + "console": "integratedTerminal", + "args": [ + "runserver", + "--noreload", + "--nothreading" + ], + "django": true + }, + { + "name": "Python: Flask", + "type": "python", + "request": "launch", + "module": "flask", + "env": { + "FLASK_APP": "app.py" + }, + "args": [ + "run", + "--no-debugger", + "--no-reload" + ], + "jinja": true + }, + { + "name": "Python: Current File (External Terminal)", + "type": "python", + "request": "launch", + "program": "${file}", + "console": "externalTerminal" + } + ] +} \ No newline at end of file diff --git a/config.py b/config.py index df1309a..55d1e40 100644 --- a/config.py +++ b/config.py @@ -16,7 +16,7 @@ # Specifies the path where Visual Studio code extensions are installed in Windows # (You do not need to change this unless your Visual Studio Code extensions are installed # at a different path.) -vsCodeExtensions = r'%USERPROFILE%\.vscode\extensions' +vsCodeExtensions = '%USERPROFILE%/.vscode/extensions' # The EventStudio command line to be used to generate the sequence diagrams. eventStudioCommandLine = r'{eventStudio} build project.scn.json' diff --git a/funutils.py b/funutils.py index cfa3702..7ef4f51 100644 --- a/funutils.py +++ b/funutils.py @@ -80,7 +80,7 @@ def first(xs : Iterable[a], condition = lambda x: True) -> Maybe[a]: If the condition is not given, returns the first item of the iterable. - Raises `StopIteration` if no item satysfing the condition is found. + Raises `StopIteration` if no item satisfying the condition is found. >>> first( (1,2,3), condition=lambda x: x % 2 == 0) 2