You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate into 'launch.json' usability improvements #13353
changed the title [-]Debug - investigate into launch.json usability improvements @isi @andre[/-][+]Investigate into 'launch.json' usability improvements[/+]on Oct 7, 2016
Instead of using smart indentation we have decided to remove all configurations which are not needed for the initial experience and which had the default value if not set anyways. Apart from that we also use a heuristic that we add the sourceMap and outDir properties only if a user has opened a typescript or a coffeescript file.
With all of this put together, here is how previously an initial 'launch.json' looked.
Feedback on the current strcture are very welcome.
In the next comment I will describe how other debug adapters can adopt and benefit from this feature.
In order to support this we changed how initial configurations are contributed by a command by the debug adapters. How this works in the current stable version is described here.
We changed this a bit and decided to give the full power of generating the initial 'launch.json' to the debug adapters - if a debug adapter contributes a command for providing the initial launch configuration.
This allows the content to contain comments. Inside the comments we recommend providing links to documentaiton so it is easier for the user to setup his 'launch.json'. Also providing a minimal numer of configurations initialy is a good idea.
The current node debugger is good example of this. Though there is some ugly string magic in order to make this possible for the node debug case here. For regular adapters this should be more straightforward as only the string content should be sent and no conversion from json is required.
Andre Weinand (@weinand) should we ping the debug adapter writers so they are aware of the change on time (before our next release notes)?
Felix Becker (@felixfbecker) forgot to mention - we will still support contributing the 'initialConfigurations' from the 'package.json' of a debug adapter. But that approach has less power as it is impossible to add comments using that approach.
However it is a breaking change in a sense that contributing the 'initialConfigurations' via a command now always has to return the full content of a 'launch.json' - and not only the 'configurations' part.
While simplifying the config and reducing information overload are good, I think the syntax highlighting could be improved.
I agree with Felix Becker (@felixfbecker) . As user of course I'm interested in my debug target's name, as it's the label I'll be dealing with in Debug Viewlet. I certainly care if it's node or chrome and if it's launch or attach.
Contrary to what the highlighting suggests, the currently grayed-out options are the most important ones.
Okay, I've been using this new highlighting for a week now in insiders and want to share my honest feedback. I can only say it is horribly confusing. At first sight it just looks like the highlighting is plain broken. But it also goes against the point of syntax highlighting. Syntax highlighting is there so I can read/scan code quicker. In the JSON case that means keys and values are colored differently. So in my mind I scan the JSON from top to bottom and "read" the keys and their values. And of course I also scan the target and request, no matter if they are "important" in your opinion or not, because the eyes just go from top to bottom. Having both the key and the value grey just makes it harder to scan the whole file, it disturbs.
Besides that, the claim that these are not edited is wrong - adding a new launch config for me means selecting an existing, and using the keyboard shortcut to copy the lines down. And then go and edit the values, including request and type.
And after using regularly for a week, I still like it :)
I am often looking at launch configs and toggling 'sourceMap', or changing the args or program, but a 'node' launch config will always be 'node', so I want to focus on the props that distinguish one 'node' launch config from another. And I can still edit the other props if needed, but rarely do.
My only concern would be that it's not obvious at first why it's gray. Will people think that those lines are somehow disabled?
I should mention that I also have many projects with mixed launch configs. For example a repository with configs for debugging the PHP backend, the Chrome frontend or the Gulp build script.
As I'm using a color theme I wrote, at the first sight of this feature, the first thing that came into my mind is my color theme is terrible with this file. But later on I figured out that's a new feature and I started to like it as it greyed out both type and request which I don't want to ppl to modify if they don't understand what it means. So the only catch IMHO is how to educate users about this feature instead of confusing them.
Activity
[-]Debug - investigate into launch.json usability improvements @isi @andre[/-][+]Investigate into 'launch.json' usability improvements[/+]isidorn commentedon Oct 12, 2016
After discussions with Andre Weinand (@weinand) we have decided to introduce top level comments in the generated 'launch.json' which can point to some documentation (depending on the debug adapter). In the node case they point to https://go.microsoft.com/fwlink/?linkid=830387 . Due to that we need to imporve our documentation for 'launch.json', there is an issue which is tracking this microsoft/vscode-docs#450
Instead of using smart indentation we have decided to remove all configurations which are not needed for the initial experience and which had the default value if not set anyways. Apart from that we also use a heuristic that we add the
sourceMapandoutDirproperties only if a user has opened a typescript or a coffeescript file.With all of this put together, here is how previously an initial 'launch.json' looked.
And here is the current structure. Much more clean and easier to use IMHO
Feedback on the current strcture are very welcome.
In the next comment I will describe how other debug adapters can adopt and benefit from this feature.
fyi Andre Weinand (@weinand) Erich Gamma (@egamma) Chris Dias (@chrisdias) Greg Van Liew (@gregvanl)
isidorn commentedon Oct 12, 2016
In order to support this we changed how initial configurations are contributed by a command by the debug adapters. How this works in the current stable version is described here.
We changed this a bit and decided to give the full power of generating the initial 'launch.json' to the debug adapters - if a debug adapter contributes a command for providing the initial launch configuration.
This allows the content to contain comments. Inside the comments we recommend providing links to documentaiton so it is easier for the user to setup his 'launch.json'. Also providing a minimal numer of configurations initialy is a good idea.
The current node debugger is good example of this. Though there is some ugly string magic in order to make this possible for the node debug case here. For regular adapters this should be more straightforward as only the string content should be sent and no conversion from json is required.
Andre Weinand (@weinand) should we ping the debug adapter writers so they are aware of the change on time (before our next release notes)?
weinand commentedon Oct 12, 2016
Isidor Nikolic (@isidorn) yes, please cc the 'usual suspects' (https://github.com/Microsoft/vscode-debugadapter-node/wiki/VS-Code-Debug-Protocol-Implementations) for this issue.
isidorn commentedon Oct 12, 2016
fyi roblourens Gregg Miskelly (@gregg-miskelly) Don Jayamanne (@DonJayamanne) Luke Hoban (@lukehoban) David Wilson (@daviwil) Keith Hill (@rkeithhill) Del Myers (@delmyers) Felix Becker (@felixfbecker) Jimmy Thomson (@MSLaguana) Peng Lyu (@rebornix) Andy Sterland (@andysterland) Holger Benl (@hbenl) lukaszunity
felixfbecker commentedon Oct 12, 2016
Is this a breaking change?
isidorn commentedon Oct 12, 2016
Felix Becker (@felixfbecker) forgot to mention - we will still support contributing the 'initialConfigurations' from the 'package.json' of a debug adapter. But that approach has less power as it is impossible to add comments using that approach.
However it is a breaking change in a sense that contributing the 'initialConfigurations' via a command now always has to return the full content of a 'launch.json' - and not only the 'configurations' part.
25 remaining items
felixfbecker commentedon Oct 17, 2016
MythicAngel I proposed this once: #4851
weinand commentedon Oct 17, 2016
Yes, this was already discussed in #4851 and the argumentation is still valid.
octref commentedon Oct 21, 2016
While simplifying the config and reducing information overload are good, I think the syntax highlighting could be improved.
I agree with Felix Becker (@felixfbecker) . As user of course I'm interested in my debug target's name, as it's the label I'll be dealing with in Debug Viewlet. I certainly care if it's
nodeorchromeand if it'slaunchorattach.Contrary to what the highlighting suggests, the currently grayed-out options are the most important ones.
felixfbecker commentedon Oct 21, 2016
Okay, I've been using this new highlighting for a week now in insiders and want to share my honest feedback. I can only say it is horribly confusing. At first sight it just looks like the highlighting is plain broken. But it also goes against the point of syntax highlighting. Syntax highlighting is there so I can read/scan code quicker. In the JSON case that means keys and values are colored differently. So in my mind I scan the JSON from top to bottom and "read" the keys and their values. And of course I also scan the target and request, no matter if they are "important" in your opinion or not, because the eyes just go from top to bottom. Having both the key and the value grey just makes it harder to scan the whole file, it disturbs.
Besides that, the claim that these are not edited is wrong - adding a new launch config for me means selecting an existing, and using the keyboard shortcut to copy the lines down. And then go and edit the values, including request and type.
weinand commentedon Oct 21, 2016
This is great feedback, thanks a lot!
roblourens commentedon Oct 21, 2016
And after using regularly for a week, I still like it :)
I am often looking at launch configs and toggling 'sourceMap', or changing the args or program, but a 'node' launch config will always be 'node', so I want to focus on the props that distinguish one 'node' launch config from another. And I can still edit the other props if needed, but rarely do.
My only concern would be that it's not obvious at first why it's gray. Will people think that those lines are somehow disabled?
felixfbecker commentedon Oct 21, 2016
I should mention that I also have many projects with mixed launch configs. For example a repository with configs for debugging the PHP backend, the Chrome frontend or the Gulp build script.
rebornix commentedon Oct 21, 2016
My 2 cents here after using it for a week.
As I'm using a color theme I wrote, at the first sight of this feature, the first thing that came into my mind is
my color theme is terrible with this file. But later on I figured out that's a new feature and I started to like it as it greyed out bothtypeandrequestwhich I don't want to ppl to modify if they don't understand what it means. So the only catch IMHO is how to educate users about this feature instead of confusing them.rkeithhill commentedon Oct 23, 2016
Andre Weinand (@weinand) Is there an officially supported way to declare a configuration attribute as deprecated?
Right now I'm leaving in
programbut changing the comment to indicate that it is deprecated and that thescriptproperty should be used instead.felixfbecker commentedon Oct 24, 2016
would be nice to set
deprecated: truein the JSON schema for this.weinand commentedon Oct 24, 2016
Keith Hill (@rkeithhill) no, it is not yet possible to declare a configuration attribute as deprecated.
But I agree with Felix Becker (@felixfbecker) that we should introduce this.
I've created this feature request: #14260
add decorations for launch.json
add decorations for launch.json