Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad error message if cwd points to non-existing directory #398

Open
GitMensch opened this issue May 23, 2023 · 2 comments
Open

bad error message if cwd points to non-existing directory #398

GitMensch opened this issue May 23, 2023 · 2 comments

Comments

@GitMensch
Copy link
Collaborator

GitMensch commented May 23, 2023

Currently we land in:

this.handleMsg("stderr", "Could not start debugger process, does the program exist in filesystem?\n");

I guess there is an option to check cwd in both "local" and "remote" case.

Output of the debugging console:

Could not start debugger process, does the program exist in filesystem?
Error: spawn gdb ENOENT

@WebFreak001
Copy link
Owner

the simplest option would just be changing the error message to also include a mention about cwd

@GitMensch
Copy link
Collaborator Author

Would you mind if I add a check using

function isDirectoryAvailable(directoryPath: string): Error | null {
  try {
    fs.accessSync(directoryPath, fs.constants.F_OK);
    return null; // Directory exists
  } catch (error) {
    return error; // Return the error object
  }
}

to #401 and have a "combined" PR for these issues (this would also go to mibase and be called directly after checking the debugger - as the ChildProcess.spawn is used in every case and that takes the cwd.

...hm but the ssh one - did I miss that case when checking for the debugger and should extra handle that for both checks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants