actboy168 / lua-debug

Lua Debug Adapter for Visual Studio Code
MIT License
431 stars 93 forks source link

better error msg when launcher #223

Closed fesily closed 1 year ago

fesily commented 1 year ago

用tmp/ipc_pid_failed文件通知前端launcher失败了,并且返回给vscode提示相应的错误信息

actboy168 commented 1 year ago

现在启动的流程是这样

  1. vscode发送attch请求给frontend
  2. frontend运行inject,并connect一个unix domain socket的地址
  3. inject启动launch
  4. launch启动worker
  5. worker listen第二步的unix domain socket,完成整个启动流程

让vscode知道出错的方式就是给vscode发送包含错误信息的attach的回包。在frontend出错,可以直接发这个包;在worker出错,可以通过第2步和第5步建立的连接,让frontend转发这个包。

所以如果在launch出错,我觉得应该是让launch建立这个本该是worker建立的连接,发送一个错误回包。

actboy168 commented 1 year ago

fc32c1f08ea2ecd52f5da51cdd19df0af29e6bd2