-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify terminal group for integrated terminal in launch configuration #68123
Comments
(Experimental duplicate detection) |
A further comment: I guess perhaps the most logical thing would be to simply support the same https://code.visualstudio.com/docs/editor/tasks#_output-behavior |
I'm not sure we want this group concept proliferating to everything @alexr00? Split APIs for the terminal will likely look more like the view column APIs. |
Please when considering this realise how currently painful it is with compound launch configs that launch multiple integrated terminals. You are forever switching between terminals (whose order is a bit random). Anything that allows a compound launch config to launch integrated terminals in side-by-side clusters to group related terminals visually would do the job. Groups seemed the perfect solution but then I don't understand how the view column APIs work (are they for creation of a dynamic grid of terminals like the group concept or just a static grid? These two concepts are different and complementary). Also fragmentation between the operation of integrated terminals for tasks and launch configurations doesn't seem good? |
Just to give some thoughts on the concepts and possible roadmap here. I think there is a need to support a dynamic grid of terminals that grows and shrinks as associated tasks or debug configs are started/stopped etc. (Growing or shrinking refers here to number of terminals not UI boundaries which are assumed fixed.) That is for me what the whole group concept is about. I think the group concept is great and could usefully be extended to be a 2D grid and support position ordering etc. This group concept can be seen as completely independent of and complementary to the useful idea of a static UI arrangement of terminals which persists between sessions of VS Code and which could ultimately be 3D (i.e. stacks of 2D grids like we have stacks of 1D grids today) or something else you are working on. Each terminal in the static arrangement could itself be a group - possibly empty (a placeholder) and awaiting its first dynamic member (task or launch config starting). Note that creating a static mapping between a particular terminal and a task or launch config, a useful function which cannot be done today, is then as simple as assigning a group name to both. Ultimate support for static arrangements of terminals with nested dynamic grids (groups) as described here seems to me a possible ultimate aspiration and would be very powerful indeed. It creates a flexible way of expressing the relationships between terminals and tasks/debug configs that use them. Which increases the usefulness and usability of both integrated terminals and tasks/debug configs. Done well, I think this would be a killer feature for VS Code vs other IDEs. |
@markfinlabs Please be aware that in contrast to tasks, launch configurations do not know anything about terminals. If a debugger supports launching in the integrated terminal, this is an implementation detail of the debugger. And the launch config properties related to terminals are part of the debugger's JSON schema, not part of VS Code's schema. The only thing we (VS Code) could do is to add the notion of a "terminal group" to the DAP request "runInTerminal" that many debug adapters use to run something in the integrated terminal. |
Thanks for the reply and the additional info. Would it make sense to expose the same
|
A specified "presentation property" in the "runInTerminal" request makes only sense if the specification is "universal" (independent from VS Code). If it is very specific to VS Code, we do not want to include it in the DAP. |
Okay, got it, DAP is a general protocol which I didn't know much about which I guess allows people to create debug profiles that work with multiple IDEs. So I see why this has to be an IDE-specific option bag for enhanced experience with VS Code. I would definitely support adding presentation or similar as an opaque option bag : ). |
Just to note, on StackOverflow, there is a desire to be able to clear the integrated terminal when starting debugging. |
Has there been any progress made on this? I just started working with compound debugging and it seemed obvious that they would start in terminals side by side! Is there a way to manually arrange the terminals once debugging has started? |
Is there a way to merge the 2 integrated terminals into one integrated terminal so that they split into two? |
Is there any update on this? Like @tommitytom, I just got started on compound debugging and it would be really nice to have them split. There doesn't appear to be a way to split them after they've started to run like @ldarshan1991 suggested. Thanks for hearing me out. :D |
Because this shows up first for me when searching, it seems like
However, I couldn't get this to work, despite the string between https://code.visualstudio.com/docs/editor/debugging#_launchjson-attributes |
That presentation group is not related to the terminal group. We still need DAP support for something like this. |
Just wanted to add that I've come up with something of a workaround for this using editor group and editor terminals. After I launch my compound debug and the new integrated terminals are created, I drag them out into the editor area to make them separate tabs, and then use View -> Editor Layout -> Grid 2x2 so that I can see both terminals side by side. Would be great if they could launch directly into split panes, but this works for now. |
I was just digging into this as I start Advent of Code with ReScript which requires two scripts to run in parallel I'm actually using {
"version": "2.0.0",
"tasks": [
{
"label": "ReScript Watcher",
// "type": "npm",
// "script": "res:dev",
"type": "shell",
"command": "bun run res:dev",
"isBackground": true,
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"group": "dev",
}
},
{
"label": "Vite Server",
// "type": "npm",
// "script": "dev",
"type": "shell",
"command": "bun run dev",
"isBackground": true,
"problemMatcher": [],
"group": "build",
"presentation": {
"group": "dev",
}
},
{
"label": "Run dev tasks",
"dependsOn": [
"ReScript Watcher",
"Vite Server"
],
"dependsOrder": "parallel",
"problemMatcher": [],
"presentation": {
"group": "dev",
"reveal": "always",
"panel": "shared"
}
}
]
} |
It works with tasks.json, but don't with launch.json in configurations and compounds. |
Did anyone ever figure out a solution for this? I'm trying to launch a node-terminal and debugpy in split terminals. |
It is great to see that task configurations now allow the specification of terminal group (#47265) - works well from my initial testing. Can you please also allow launch configurations to specify terminal group when using the integrated terminal for debug and start/stop?
See my comment here: #47265 (comment)
The text was updated successfully, but these errors were encountered: