试过在环境变数中加了 PTVSD_LOG_DIR, 但没有任何log档案产生。
试了中断compilation,显示下面的讯息,看起来是IPC的问题,不知如何处理
-*- mode: compilation; default-directory: "d:/Stock/gui/" -*-
Compilation started at Wed Sep 11 01:21:35
c:/Python37/python.exe -m ptvsd --wait --host localhost --port 32000 d:/Stock/gui/TwseBase.py
Exception in thread ptvsd.Server:
Traceback (most recent call last):
File "c:\Python37\lib\site-packages\ptvsd\ipcjson.py", line 315, in process_one_message
msg = self.__message.pop(0)
IndexError: pop from empty list
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Python37\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "c:\Python37\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "c:\Python37\lib\site-packages\ptvsd\wrapper.py", line 906, in process_messages
self.process_messages()
File "c:\Python37\lib\site-packages\ptvsd\ipcjson.py", line 305, in process_messages
self.process_one_message()
File "c:\Python37\lib\site-packages\ptvsd\ipcjson.py", line 318, in process_one_message
self._wait_for_message()
File "c:\Python37\lib\site-packages\ptvsd\ipcjson.py", line 179, in _wait_for_message
"Malformed header, expected 'name: value'\n" + line)
ptvsd.ipcjson.InvalidHeaderError: Malformed header, expected 'name: value'
Traceback (most recent call last):
File "c:\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\Python37\lib\site-packages\ptvsd\__main__.py", line 269, in <module>
main()
File "c:\Python37\lib\site-packages\ptvsd\__main__.py", line 265, in main
wait=args.wait)
File "c:\Python37\lib\site-packages\ptvsd\__main__.py", line 258, in handle_args
debug_main(addr, name, kind, *extra, **kwargs)
File "c:\Python37\lib\site-packages\ptvsd\_local.py", line 45, in debug_main
run_file(address, name, *extra, **kwargs)
File "c:\Python37\lib\site-packages\ptvsd\_local.py", line 79, in run_file
run(argv, addr, **kwargs)
File "c:\Python37\lib\site-packages\ptvsd\_local.py", line 140, in _run
_pydevd.main()
File "c:\Python37\lib\site-packages\ptvsd\_vendored\pydevd\pydevd.py", line 1934, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "c:\Python37\lib\site-packages\ptvsd\_vendored\pydevd\pydevd.py", line 1239, in run
time.sleep(0.1) # busy wait until we receive run command
KeyboardInterrupt
Compilation unknown signal at Wed Sep 11 01:22:22