| 106 | |
| 107 | |
| 108 | def generate_dont_trace_files(): |
| 109 | template = """# Important: Autogenerated file. |
| 110 | |
| 111 | # fmt: off |
| 112 | # DO NOT edit manually! |
| 113 | # DO NOT edit manually! |
| 114 | |
| 115 | LIB_FILE = 1 |
| 116 | PYDEV_FILE = 2 |
| 117 | |
| 118 | DONT_TRACE_DIRS = { |
| 119 | %(pydev_dirs)s |
| 120 | } |
| 121 | |
| 122 | LIB_FILES_IN_DONT_TRACE_DIRS = { |
| 123 | %(pydev_lib_files_in_dont_trace_dirs)s |
| 124 | } |
| 125 | |
| 126 | DONT_TRACE = { |
| 127 | # commonly used things from the stdlib that we don't want to trace |
| 128 | 'Queue.py':LIB_FILE, |
| 129 | 'queue.py':LIB_FILE, |
| 130 | 'socket.py':LIB_FILE, |
| 131 | 'weakref.py':LIB_FILE, |
| 132 | '_weakrefset.py':LIB_FILE, |
| 133 | 'linecache.py':LIB_FILE, |
| 134 | 'threading.py':LIB_FILE, |
| 135 | 'dis.py':LIB_FILE, |
| 136 | |
| 137 | # things from pydev that we don't want to trace |
| 138 | %(pydev_files)s |
| 139 | } |
| 140 | |
| 141 | # if we try to trace io.py it seems it can get halted (see http://bugs.python.org/issue4716) |
| 142 | DONT_TRACE['io.py'] = LIB_FILE |
| 143 | |
| 144 | # Don't trace common encodings too |
| 145 | DONT_TRACE['cp1252.py'] = LIB_FILE |
| 146 | DONT_TRACE['utf_8.py'] = LIB_FILE |
| 147 | DONT_TRACE['codecs.py'] = LIB_FILE |
| 148 | |
| 149 | # fmt: on |
| 150 | """ |
| 151 | |
| 152 | pydev_files = [] |
| 153 | pydev_dirs = [] |
| 154 | pydev_lib_files_in_dont_trace_dirs = [] |
| 155 | |
| 156 | exclude_dirs = [ |
| 157 | ".git", |
| 158 | ".settings", |
| 159 | "build", |
| 160 | "build_tools", |
| 161 | "dist", |
| 162 | "pydevd.egg-info", |
| 163 | "pydevd_attach_to_process", |
| 164 | "pydev_sitecustomize", |
| 165 | "stubs", |