summaryrefslogtreecommitdiff
path: root/inkstitch.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-10-23 18:08:46 -0600
committerGitHub <noreply@github.com>2018-10-23 18:08:46 -0600
commitd9525968a2462270ed5ef0f2ec1742c8ae325079 (patch)
tree24d0aa04d2a392a64f206e6d5abba2a185b4118c /inkstitch.py
parent3e6704e5c0382ba6b338649bb656dbc7d76508fc (diff)
fix manual stitch and add debugging support (#339)
* add debugging support using pydev * fix: don't add tie stitches for manual stitch * fix style
Diffstat (limited to 'inkstitch.py')
-rw-r--r--inkstitch.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/inkstitch.py b/inkstitch.py
index 2e21d964..b466a508 100644
--- a/inkstitch.py
+++ b/inkstitch.py
@@ -1,14 +1,28 @@
+import os
import sys
import traceback
from argparse import ArgumentParser
-from lib.utils import save_stderr, restore_stderr
+
from lib import extensions
+from lib.utils import save_stderr, restore_stderr
parser = ArgumentParser()
parser.add_argument("--extension")
my_args, remaining_args = parser.parse_known_args()
+if os.path.exists(os.path.join(os.path.dirname(os.path.realpath(__file__)), "DEBUG")):
+ # How to debug Ink/Stitch:
+ #
+ # 1. Install LiClipse (liclipse.com) -- no need to install Eclipse first
+ # 2. Start debug server as described here: http://www.pydev.org/manual_adv_remote_debugger.html
+ # * follow the "Note:" to enable the debug server menu item
+ # 3. Create a file named "DEBUG" next to inkstitch.py in your git clone.
+ # 4. Run any extension and PyDev will start debugging.
+
+ import pydevd
+ pydevd.settrace()
+
extension_name = my_args.extension
# example: foo_bar_baz -> FooBarBaz