microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.51k stars 1.55k forks source link

Option to change the title of the integrated terminal in vscode for a launched C application? #6485

Open ldarshan1991 opened 3 years ago

ldarshan1991 commented 3 years ago

Type: Debugger

Describe the bug

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

  1. Have launch configuration to launch an C application

{ "launch": { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "App1", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/path/to/the/executable/x86_64bi_linux-abc", "args": [ "102" ], "presentation": { "hidden": false, "group": "NonGDB", "order": 1 }, "stopAtEntry": false, "cwd": "/another/path/where/necessary/data/file/is/present", "environment": [], "externalConsole": false, "MIMode": "gdb", "miDebuggerPath": "/path/to/gdb-8.1.2", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] } }



2. When I launch an application in vscode via launch.json. The application launches from the integrated terminal with the title of the terminal set to that application name.

![image](https://user-images.githubusercontent.com/28981482/98681169-64499380-2388-11eb-962f-706207672d85.png)

Need an property in the launch.json to set my choice of name for the terminal?

**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.

parent request raised in VSCode - https://github.com/microsoft/vscode/issues/109235
WardenGnaw commented 3 years ago

Thank you for filing this issue.

We will investigate adding terminalName to the launch.json and setting it for the RunInTerminal title.

This is where we set the title. https://github.com/microsoft/MIEngine/blob/ec52d600d5d4a5d9a2517aa392e0c1767ad49e55/src/MICore/Transports/RunInTerminalTransport.cs#L51

ldarshan1991 commented 3 years ago

Thanks @WardenGnaw for picking up this request.

github-actions[bot] commented 3 years ago

This issue has been closed automatically because it has not had recent activity.

guusw commented 6 months ago

Can we reopen this, I'd like to have this as it's very useful when debugging network applications. My terminal kind of looks like this now, and it's hard to differentiate between configurations: image

dimateos commented 5 months ago

As I explain in the referenced issue, it might be better implemented in vscode, but will see how it goes with their backlog of features etc. Consider upvoting it if you are interested 👍

pirpyn commented 3 months ago

Hi, also upvoting for the same reason, as setting in settings.json

   "terminal.integrated.tabs.title": "${task}",

Doesn't affect the terminal opened by the launch.json task.

Prefixing the terminal title by the launch name will be a quality of life improvement for many of us that are doing parallele debugging.

something like the pseudo code

FormattableString.Invariant($"{getLaunchTaskName()} | cppdbg: {Path.GetFileName(options.ExePath)}");