EmmyLua / VSCode-EmmyLua

Lua IDE/Debugger Plugin for VSCode
633 stars 89 forks source link

当.vscode的存储路径中存在空格时,无法获取进程列表。 #78

Closed EthanShi closed 2 years ago

EthanShi commented 3 years ago

child_process.exec应当加引号防止将路径中的空格识别为分隔符。 version: 0.3.49 file: out\debugger\Em0myAttachDebuggerProvider.js line: 35

// before
const args = [`${this.context.extensionPath}/debugger/emmy/windows/x86/emmy_tool.exe`, "list_processes"];
// after
const args = [`"${this.context.extensionPath}/debugger/emmy/windows/x86/emmy_tool.exe"`, "list_processes"];

参考:https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback