Closed hyh19962008 closed 2 years ago
Currently lua-debug uses posix_spawn_file_actions_addchdir_np
to support modifying cwd. Unfortunately posix_spawn_file_actions_addchdir_np
is only supported since glibc 2.29.
So we need a fallback implementation.
When debugging on Linux, the "cwd" parameter is not properly set in launch.json. That means, whatever value the "cwd" is set, the debugger starts with "cwd" set to "~"(user's home directory), causing dofile() statements with relative path passed in your Lua script to fail.
Use the following script and start debug session to test current working directory:
Tested on: Ubuntu 18.04 64bit Ubuntu 16.04 64bit Ubuntu 16.04 64bit Server connected with remote-SSH
Luckily, this can be fixed by manually changing "lua.debug.settings.console" from "internalConsole" to "integratedTerminal" in setting. It's strange that the value in package.json in the github repo code is set default to "integratedTerminal", while the one you download directly from VS marketplace is set to "internalConsole". Please fix it.
Best!