summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2021-08-16 15:21:46 -0400
committerGlenn Smith <glenn@vector35.com>2021-08-16 15:21:46 -0400
commit2d790a6c95c06359acaf9821fac919c5a3f11c18 (patch)
tree3d4152e9a1900a59e47bcf45d5d2168d23396fe2 /docs
parentaaa3ab8e95b686cd30414f49b0223ee9fe2a0928 (diff)
Move py debugger functions to __init__.py
Diffstat (limited to 'docs')
-rw-r--r--docs/getting-started.md22
1 files changed, 0 insertions, 22 deletions
diff --git a/docs/getting-started.md b/docs/getting-started.md
index 032e0f85..07925ac9 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -493,28 +493,6 @@ The python interpreter can be customized to run scripts on startup using `startu
# Commands in this file will be run in the interactive python console on startup
from binaryninja import *
-
- def connect_pycharm_debugger(port=33333):
- # Get pip install string from PyCharm's Python Debug Server Configuration
- # e.g. for PyCharm 2021.1.1 #PY-7142.13:
- # pip install --user pydevd-pycharm~=211.7142.13
- import pydevd_pycharm
- pydevd_pycharm.settrace('localhost', port=port, stdoutToServer=True, stderrToServer=True, suspend=False)
-
-
- def connect_vscode_debugger(port=5678):
- # Note: Calling this from startup.py will cause Binary Ninja to hang on startup until VSCode starts debugging
- # pip install --user debugpy
- import debugpy
- import sys
- if sys.platform == "win32":
- debugpy.configure(python=f"{sys.base_exec_prefix}/python", qt="pyside2")
- else:
- debugpy.configure(python=f"{sys.base_exec_prefix}/bin/python3", qt="pyside2")
- debugpy.listen(("127.0.0.1", port))
- debugpy.wait_for_client()
- execute_on_main_thread(lambda: debugpy.debug_this_thread())
-
From here, you can add any custom functions or objects you want to be available in the console. If you want to restore the original copy of `startup.py` at any time, simply delete the file and restart Binary Ninja. A fresh copy of the above will be generated for you in `startup.py`.