Skip to content

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

Open

Description

@GitMensch

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

Activity

  1. WebFreak001 commented on May 23, 2023

    @WebFreak001
    Owner

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

  2. GitMensch commented on Jun 6, 2023

    @GitMensch
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions