-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Run normally without debug #2780
Comments
@TheColorRed no there is no run command, but I think it is a valid feature request. @isidorn what do you think? |
@weinand I agree it is a valid feature request. Not sure how to best handle this, adding a 'silent' option in the |
Could this be covered by a new |
By debugger attachment logic you mean open the debug console and open the debug viewlet? |
@egamma sure, but it has to go through the debug adapter (DA) because VS Code doesn't know anything about how to launch a program or that an 'debugger attachment logic' even exists. And the launch/attach config attributes are not part of the debug protocol but are contributed by a debug extension, so VS Code cannot know how to use them in order to 'run' a program. It is probably a new built-in launch config attribute Another interesting question is whether VS Code tracks programs started this way. If there is no debug session, there will be no 'Terminate' button. This requires some new terminate UI if the program is run in the internal debug console. |
@weinand makes sense, but from a user perspective I would not want to have to edit the launch config when I want to switch from running under the debugger and running without the debugger. My thinking was that the |
@egamma yes, I was assuming that... Sorry for not making this clear. |
@felixfbecker thanks for your great suggestions in #3209 (and sorry that I had to make your newer issue a duplicate of this older one...) |
@weinand my bad for not searching enough first ;) |
Gonna repost what I said:
However, I also prefer the idea of having a |
@felixfbecker one problem with the 'un-typed' approach is that there are no "well known" attributes such as So probably we will go with the |
@weinand I just think for "just running" there should be no debug adapter needed, so it should work even if such an extension doesn't exist (yet). |
@felixfbecker for "just running" there are no launch config attributes that we can rely on. So we would have to introduce another task running subsystem with its own set of predefined attributes. But this is something that we want to avoid because a task running subsystem already exists in VS Code and it requires only a little bit of additional work to pimp it up to support the "just running" functionality. |
@isidorn I've added 'Run' support to node-debug by introducing a Now we need a few UI tweaks. My proposal is this:
What do you think? Is this feasible? |
@weinand great! Here's my first impression, I can provide more details once I have looked deeper into the code.
Thoughts? |
@isidorn all three make sense for an initial version. |
Great, so I will start on it as proposed in the previous comment. Would we keep this action only as a global workbench action for starters, or we would surface it in the viewlet. For start, I propose to only have a global workbench action since it does not belong in the debug viewlet, since it is run, not debug. |
@weinand @isidorn I think the whole feature only really adds true benefit if
I actually even thought about creating a debug adapter that doesn't debug but simply runs whatever is thrown at it. I opened the feature request because I thought this should be a core feature rather. If you do not plan to do this, I would go at creating that adapter ;) |
@felixfbecker it was never the idea to copy launch configs or to let the user add the 'noDebug' attribute. Just read my proposal from above: there will be a 'Run' action (which of course has a shortcut), that adds the 'noDebug' option into the args passed to launch behind the scene. Running arbitrary programs (e.g. Java) is (or soon will be) possible with tasks. We are not going to copy this functionality in debug land. Please feel free to to write an debug adapter that simply runs whatever is thrown at it. ;-) |
@isidorn the 'Run' action operates only on the currently selected launch config (like "Debug"). If the adapter doesn't support 'Run', it will fall back to Debug. This is ok for the first version. If we want to enable 'Run' only for DAs that support Run, we could either use a flag in the DA's package.json or a flag returned from the Initialize request. In the former case we could disable 'Run' early because we have the necessary information when a launch config is selected in the drop down. In the latter case 'Run' would be always enabled but it would aborted as soon as Initialize returns the flag. |
@daviwil please file a separate issue for this. Sounds like an interesting use case that we should support in the future. |
I'm a little confused. Are you referring to the release on "March" 7th or a future release which may or may not happen in March? Maybe it's time to rethink the milestone naming convention. ;-) |
@rkeithhill In March we are working on the 'March' release which ideally ships at the end of March (but in practice slips a bit into the next month). So what was released on March 7 was the February release. |
@weinand Thanks for the link! |
So... is there still no way to run without a debug adapter? If I'm working on an obscure system (and I am), and my build task is an arbitrary command, shouldn't my run task be able to be one too? I don't want to have to write a debug adapter that does absolutely nothing just to be able to appease the |
@obskyr For now, you can use a task (tasks.json) to run something without debugging it. I've done this with some Electron development I've been doing. I also mark the task with |
More about the tasks framework can be found here https://code.visualstudio.com/docs/editor/tasks |
Still seems very opinionated towards grunt type tasks
…On May 29, 2017 10:47 PM, "Isidor Nikolic" ***@***.***> wrote:
More about the tasks framework can be found here
https://code.visualstudio.com/docs/editor/tasks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2780 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABoM2hG6zmjCZ0VX70SQWHdDW5GA8YeNks5r-qJagaJpZM4HVLo4>
.
|
@justin-romano why do you think that tasks are opinionated towards grunt? The doc says: "... can be a task runner like gulp or grunt or any command line tool like a compiler or linter" and grunt always shows up together with gulp and jake. |
Just the way it has the tasks list. Not all tools use parameters the same
way.
…On May 30, 2017 10:14 AM, "Andre Weinand" ***@***.***> wrote:
@justin-romano <https://github.com/justin-romano> why do you think that
tasks are opinionated towards grunt?
The doc says: "... can be a task runner like gulp or grunt or any command
line tool like a compiler or linter" and grunt always shows up together
with gulp and jake.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2780 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABoM2kQkqN9uvRVCKa8fE4IGABc3_tCvks5r-0NegaJpZM4HVLo4>
.
|
@dbaeumer I do not understand @justin-romano's concern. But may be you can chime in... |
@justin-romano can you make an example. And please note that 1.13 will ship with a new task runner that executes the task in the terminal plus a Task API to allow extensions to easier customize and contribute tasks. |
Several things.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"name": "SYNC",
"version": "0.1.0",
"command": "c:\\windows\\sysnative\\pscp.exe",
"isShellCommand": false,
"echoCommand": true,
"tasks": [
{
"taskName": "-pw",
"args": [
"a_password_for_sftp",
"root@192.168.20.51:/root/src/WiringOP-Zero/examples/${fileBasenameNoExtension}",
"${fileDirname}\\${fileBasenameNoExtension}"
],
"isBuildCommand": false,
"problemMatcher": "$tsc"
}
],
"showOutput": "always"
} But it may have changed since i last looked. |
Two things:
|
Could you add the information to the VSCode C++ docs and maybe post a complete tasks.json / launch.json example here? I've read a couple of issues now and can't quite make launching work...
into launch.json. My tasks.json looks like this:
The binary file is built sucessfully via CTRL+SHIFT+B, but when launching via CTRL+F5 I get the message "No executable targets are available". I guess vscode does not know what output file make generates... |
@HorstBaerbel can you start the discussion here please: https://github.com/Microsoft/vscode-cpptools It is the repository for the cpp tools and I know that they even have a problem matcher contribution now. So no need to inline one in the tasks.json. |
Thanks. Will do. |
Is there a command that will run my file without opening the debug console and without opening the debug tab?
The text was updated successfully, but these errors were encountered: