This repository was archived by the owner on Jan 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ easy_install dist/google_python_cloud_debugger-*.egg
9595 # Attach Python Cloud Debugger
9696 try :
9797 import googleclouddebugger
98- googleclouddebugger.AttachDebugger ()
98+ googleclouddebugger.enable ()
9999 except ImportError :
100100 pass
101101 ```
@@ -133,7 +133,7 @@ _Option A_: add this code to the beginning of your `main()` function:
133133# Attach Python Cloud Debugger
134134try :
135135 import googleclouddebugger
136- googleclouddebugger.AttachDebugger (
136+ googleclouddebugger.enable (
137137 enable_service_account_auth = True ,
138138 project_id = ' my-gcp-project-id' ,
139139 project_number = ' 123456789' ,
Original file line number Diff line number Diff line change 3939__version__ = '1.9'
4040
4141_flags = None
42+ _hub_client = None
43+ _breakpoints_manager = None
4244
4345
4446def _StartDebugger ():
47+ """Configures and starts the debugger."""
4548 global _hub_client
4649 global _breakpoints_manager
4750
@@ -55,7 +58,6 @@ def _StartDebugger():
5558 capture_collector .log_warning_message = logging .warning
5659 capture_collector .log_error_message = logging .error
5760
58- """Configures and starts the debugger."""
5961 capture_collector .CaptureCollector .pretty_printers .append (
6062 appengine_pretty_printers .PrettyPrinter )
6163
@@ -112,7 +114,8 @@ def _DebuggerMain():
112114 exec 'execfile(%r)' % app_path in globals , locals # pylint: disable=exec-used
113115
114116
115- def AttachDebugger (** kwargs ):
117+ # pylint: disable=invalid-name
118+ def enable (** kwargs ):
116119 """Starts the debugger for already running application.
117120
118121 This function should only be called once.
@@ -132,3 +135,6 @@ def AttachDebugger(**kwargs):
132135 _flags = kwargs
133136 _StartDebugger ()
134137
138+
139+ # AttachDebugger is an alias for enable, preserved for compatibility.
140+ AttachDebugger = enable
You can’t perform that action at this time.
0 commit comments