microsoft / microsoft/vscode-cmake-tools

Debugging mingw application fail if using non-cmd as integrated terminal

Open
#2,317 4 comments 0 reactions 0 assignees View on GitHub
Feature: debug/launch
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

Debugging MinGW application fails if using non-cmd as an integrated terminal.
I suggest vscode-cmake-tools always use cmd on windows

### Example

For instance I using msys2 as integrated terminal.
```json
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
},
"msys": {
"path": "C:\\msys64\\msys2_shell.cmd",
"args": [
"-defterm",
"-mingw64",
"-no-start",
"-use-full-path",
"-here"
]
}
},
"terminal.integrated.defaultProfile.windows": "msys",
```

When using "msys" as an integrated terminal, the following happens in the terminal but the debugging is not started.

![image](https://user-images.githubusercontent.com/604808/148593418-caa430b2-ecd7-434f-a5a5-e900ce86b47d.png)

When using "cmd" as an integrated terminal, the following happens and the debugging is started.

![image](https://user-images.githubusercontent.com/604808/148593089-08a2ebaf-a339-4c15-b746-c2b40d3ce0ce.png)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the provided terminal.integrated.defaultProfile.windows set to msys, then compare the launch behavior with Command Prompt. Trace the Windows debugging entry point and terminal selection logic in the repository; done means MinGW debugging starts with the msys profile while existing cmd behavior remains working.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.