Skip to content

New [Run/Debug Code] button unable to run code from custom location #9082

@thefatwhale

Description

@thefatwhale

Bug type: Debugger

Describe the bug

  • OS and Version: Microsoft Windows 7 x64 SP1
  • VS Code Version: 1.63.2
  • C/C++ Extension Version: 1.9.7
  • Other extensions you installed (and if the issue persists after disabling them):
  • A clear and concise description of what the bug is.

To Reproduce
Please include a code sample and launch.json configuration.
Steps to reproduce the behavior:

  1. open a C source code file
  2. click button

image
in my tasks.json's setting executable file compile to ./bin/
press f5 or ctrl f5 is ok
this is my launch.json

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "gcc.exe - 生成和调试活动文件",
			"type": "cppdbg",
			"request": "launch",
			"program": "${workspaceFolder}\\bin\\${fileBasenameNoExtension}.exe",
			"args": [],
			"stopAtEntry": false,
			"cwd": "${workspaceFolder}",
			"environment": [],
			"externalConsole": false,
			"MIMode": "gdb",
			"miDebuggerPath": "D:\\SoftwareInstallation\\Windows7\\ProgramFiles\\MinGW-w64\\win32\\bin\\gdb.exe",
			"setupCommands": [
				{
					"description": "为 gdb 启用整齐打印",
					"text": "-enable-pretty-printing",
					"ignoreFailures": true
				}
			],
			"preLaunchTask": "C/C++: gcc.exe 生成活动文件"
		}
	]
}

Additional context
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your launch.json
Add any other context about the problem here including log or error messages in your Debug Console or Output windows.

Metadata

Metadata

Assignees

Labels

bugfixedCheck the Milestone for the release in which the fix is or will be available.tasks/build/debugAn issue relating to tasks.json (e.g. build issues)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions