-
Notifications
You must be signed in to change notification settings - Fork 28.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
vscode.startDebug should take debug configuration json as argument #4615
Comments
It would be great if we could give a json config directly, something like this: workbench.action.debug.start('{
"name": "LaunchCustom",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/index.js",
"stopOnEntry": false,
"args": [],
"cwd": "${workspaceRoot}",
"preLaunchTask": null,
"runtimeExecutable": null,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"sourceMaps": false,
"outDir": null
}
'); And some events like:
|
Yes, being able to take a json config directly would be ideal! |
We have tackled this issue as part of #3789 |
Ok, we now allow both
Notice that if the passed argument is a string we will try to find the launch configuration in Try it out on the alpha channel and let me know what you think - thanks! |
I'm confused about the example code above. What is the 'vscode.startDebug' command? The command I was expecting to see is called 'workbench.action.debug.start'. Was that a typo? What my extension needs is a way to 'run' rather than 'start' the debugger with a custom configuration object. For example: vscode.commands.executeCommand('workbench.action.debug.run', { Any chance it could be tweaked so that I can do this? Your example is tantalizingly close to being perfect, but unfortunately I can't use it like that. :( Thanks! |
Hi @jcansdale we have changed the name of the command to conform to our naming patterns in the API. You are not able to use it yet in the stable VSCode since this is not released yet. Hope that makes sense |
Will I be able to use it with 'workbench.action.debug.run' as well as 'workbench.action.debug.start'? I was hoping to try it using the VS Code 'Insiders' version, see it is only currently on the 'alpha channel'. I'll give the alpha version a try. :) |
I see the insiders channel is being retired. Where can I find 'Alpha' channel builds? Thanks! |
Alpha channel will be announced soon. @chrisdias can provide more info |
Thanks, I'll ping @chrisdias. What about support for 'workbench.action.debug.run' (as opposed to '...debug.start')? That is the major issue for me. |
No, |
I'm confused. How do you mean it's not public api? It's the command that is by default associated with "ctrl+f5". Are you saying there is a way to get similar behavior to "ctrl+f5" by passing a string to another command? |
Sorry for the confusion, I misread the string you posted. |
I tested vscode.startDebug and it is working great, but I found only 2 little problems:
Do you plan to implement those features ? |
When you say restart what do you mean - clicking on the restart button does not restart the session - if that is the case then it is a bug and please file a seperate issue. |
@isidorn where can I find |
@atian25 can you please provide more details? What are you trying to do - are you writing an extension? Your extension can be activated on event: 'onDebug:TYPE' where TYPE is for instance |
just want to find workaround for cluster debug. our framework will start 3 process, named master/agent/worker, and worker will reload when file change. so I want to write an extendsion to auto detect worker's new debug port and auto attach to it. |
This sounds like a scenario which we do not support at the moment. Please create a new issue with the feature request - extension should be able to react on debuggee terminated |
Hello,
This request is related to #4607.
I need to be able to start the debugger using a configuration with a specific name.
For now, vscode can only launch the default or selected configuration.
I hope you will take my request into consideration and it will enhance vscode.
Thanks in advance for your feedback.
The text was updated successfully, but these errors were encountered: