code-debug icon indicating copy to clipboard operation
code-debug copied to clipboard

CWD Tilde handling

Open vyeevani opened this issue 4 years ago • 5 comments
trafficstars

Not sure if this is necessary a feature or just a fix for some so I'll classify it as a feature for now. Fail to find "lldb-mi" when the cwd has a "~" expansion in it.

vyeevani avatar Sep 05 '21 23:09 vyeevani

According to this, the child process developers rejected handling cwd tilde expansion so it would have to be handled inside this repo: https://github.com/nodejs/node/issues/684

vyeevani avatar Sep 06 '21 00:09 vyeevani

The feature implementation like that sounds easy:

cwd = cwd.replace(/^~/, os.homedir());

But I think this then may also be applied not to cwd, but also to the program and gdb/lldb executable and the argument list - if those don't work already.

GitMensch avatar Sep 06 '21 04:09 GitMensch

I’ve made this PR to resolve this with untildify so that the support isn’t hard coded here as a string replacement. https://github.com/WebFreak001/code-debug/pull/288

vyeevani avatar Sep 06 '21 05:09 vyeevani

@GitMensch do you happen to have write access to get this merged?

vyeevani avatar Sep 07 '21 18:09 vyeevani

@vyeevani yes, but I won't do it now as @WebFreak001 had more or less the same questions that I had, please see the PR comments.

GitMensch avatar Sep 07 '21 20:09 GitMensch