|
10 | 10 | from .compiler import (get_file_name, get_tmp_directory, get_tmp_hash_seed) |
11 | 11 |
|
12 | 12 | import debugpy |
13 | | -import time |
14 | 13 |
|
15 | 14 | class DebugpyMessageQueue: |
16 | 15 |
|
@@ -163,7 +162,6 @@ def get_host_port(self): |
163 | 162 | self.debugpy_port = self.endpoint[index+1:] |
164 | 163 | return self.debugpy_host, self.debugpy_port |
165 | 164 |
|
166 | | - |
167 | 165 | def connect_tcp_socket(self): |
168 | 166 | self.debugpy_stream.socket.connect(self._get_endpoint()) |
169 | 167 | self.routing_id = self.debugpy_stream.socket.getsockopt(zmq.ROUTING_ID) |
@@ -238,6 +236,9 @@ def tcp_client(self): |
238 | 236 |
|
239 | 237 | def start(self): |
240 | 238 | if not self.debugpy_initialized: |
| 239 | + tmp_dir = get_tmp_directory() |
| 240 | + if not os.path.exists(tmp_dir): |
| 241 | + os.makedirs(tmp_dir) |
241 | 242 | host, port = self.debugpy_client.get_host_port() |
242 | 243 | code = 'import debugpy;' |
243 | 244 | code += 'debugpy.listen(("' + host + '",' + port + '))' |
@@ -350,7 +351,7 @@ async def debugInfo(self, message): |
350 | 351 | 'isStarted': self.is_started, |
351 | 352 | 'hashMethod': 'Murmur2', |
352 | 353 | 'hashSeed': get_tmp_hash_seed(), |
353 | | - 'tmpFilePrefix': get_tmp_directory(), |
| 354 | + 'tmpFilePrefix': get_tmp_directory() + '/', |
354 | 355 | 'tmpFileSuffix': '.py', |
355 | 356 | 'breakpoints': breakpoint_list, |
356 | 357 | 'stoppedThreads': self.stopped_threads |
|
0 commit comments