Closed ermshiperete closed 3 years ago
I have experienced the same problem, in a variety of ways, however the test case from @ermshiperete is an excellent way to reproduce it.
Looking for a work around (using other predefined variables), even this doesn't work (reveals that cwd
does not get applied):
launch.json
...
"program": "${file}",
"cwd": "${fileDirname}",
...
I have this same problem and it's rough because the perl script I'm debugging drives git, where cwd is everything. I suppose I could just modify a copy of the script to cd to a directory, and then TRY REAL HARD to remember not to check that sh.. er stuff in. The developer seems like a responsible and thorough guy, but it has been a rough roll-out. I should put a pwd in. If it's not the cwd from the launch.json, what IS the cwd? Probably workspaceFolder.
cwd in launch.json really currently does not work, will be fixed in next release. I am just working on it.
Thank you. I’m sorry if I struck a critical tone. I quite like the software, but for my application it was important. I looked for the problem in the source, but I’m simply not sufficiently well-versed in the extension model. Otherwise I’d have simply made a pull request. I’m curious now, though. Isn’t the “cwd” function provided by the application? As a piece of global state, it would be easy to get stomped on, but I could see no obvious evidence of that. Or am I mistaken in the impression that handling the “cwd” entry in the configuration is a service of the app framework?
Sent from my iPhone
On Jul 8, 2021, at 6:22 AM, Gerald Richter @.***> wrote:
cwd in launch.json really currently does not work, will be fixed in next release. I am just working on it.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
cwd needs to be handled by the debugger (e.g. Perl::LanguageServer) It's fixed in af895ae91ae825aef363125ad4b87ccabb4b020f
It seems that the
cwd
option doesn't work.In my
launch.json
I have:For testing, I have a project with just one file (besides
.vscode
folder...):linux/tools/app.pl
:When I try to debug, the Debug Console shows an error:
When I change
launch.json
to contain the full path:and the output is:
instead of the expected
/tmp/perl-bug/linux
.