-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Need launch config option to disable multiple debug consoles #62419
Comments
I think this makes sense and as you say it should be in launch config, not a vscode setting since it depends on the launch configuration. |
After discussions we decided to only add this as a compound configuration option. |
We did not really recieve user feedback regarding this one so pushing it to On-Deck until we see a higher need for this. |
Adding my feedback from #64445 here as it was deleted as a duplicate of this one. What I would like to see is that the dropdown on the debug console for selecting processes will be multi-selection and not single-selection (i.e a list of checkboxes) so that I can check/uncheck the processes for which I'll see output. |
@weinand do we want to do this this milestone? "compounds": [
{
"name": "Compound",
"multiConsole": true,
"configurations": ["Server", "Client"]
}
] So when the compound is launched if multiConsole is false we will put all output in one console. Feedback on naming and wheter this is a boolean or string is welcome. Downside of this approach is that it will not be possible to do this when launching multiple independedt debug configurations. Related launch configuration attribute is named |
@isidorn, but with your suggestion I'll need to restart everytime I want to change the view. With my suggestion you can change the view while the app is running. And with my suggestion there's no need to add any config. |
Not convinced we need this. |
We definitely need this. But probably not as a launch config attribute but an option on the debug API (e.g. method |
@weinand that makes sense since I believe the use case is for sessions that are "auto-started". |
Allow debug session to share repl with its parent; fixes #62419
To verify:
|
Here's an example 'use strict';
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {
// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "sept-extension" is now active!');
let t = 0;
// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
let disposable = vscode.commands.registerCommand('extension.sayHello', () => {
console.log('hey there');
t++;
if (vscode.workspace.workspaceFolders) {
vscode.debug.startDebugging(vscode.workspace.workspaceFolders[0], t <= 1 ? 'Launch Program' : 'Launch Program 2', {
consoleMode: vscode.DebugConsoleMode.MergeWithParent,
parentSession: vscode.debug.activeDebugSession
});
}
});
context.subscriptions.push(disposable);
}
// this method is called when your extension is deactivated
export function deactivate() {
} |
@isidorn When I try the code above with ( Is that the expected result? |
If you passed consoleMode: vscode.DebugConsoleMode.MergeWithParent, then you shuold not get two debug sessions, it should just be one. I can also investigate, just let me know if you pass the proper option. |
I works, the problem I had was that the first debug session has already ended. |
Using debug consoles for multi-process debugging is painful in many situations.
We need a launch config flag to turn this off (and Cluster and multi process debugging should disable multiple debug consoles).
The text was updated successfully, but these errors were encountered: