microsoft / microsoft/MIEngine

`"cwd"` launch option ignored with custom launch commands or upon attach

Open
#1,494 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
859
Forks
233
Avg merge
1d 6h
Merged PRs (30d)
3

Description

Upon startup, MIEngine sets the debugger working directory to the location of the debugged program executable (See LaunchLocalDebuggerCommand() in src/MICore/UnixUtilities.cs).

Later, if neither the "processId" or "customLaunchSetupCommands" options are set, then the debugger working directory is set to the path held in the "cwd"/WorkingDirectory launch option. If "processId" or "customLaunchSetupCommands" is set, the debugger working directory remains as that of the debugged program executable. See GetInitializeCommands() in src/MIDebugEngine/Engine.impl/DebuggedProcess.cs

I believe that the path held in "cwd" should be applied as the debugger working directory in all cases - for consistency and because documentation does not say that this option is sometimes ignored

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read LaunchLocalDebuggerCommand() in src/MICore/UnixUtilities.cs and GetInitializeCommands() in src/MIDebugEngine/Engine.impl/DebuggedProcess.cs. Trace how the debugger working directory is selected when cwd, processId, or customLaunchSetupCommands are present. Done means cwd is applied consistently, including custom-launch and attach scenarios, with relevant behavior verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.