Skip to content

Add debug configurationSnippets to package.json to light up "Add Configuration" experience #364

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

Closed
rkeithhill opened this issue Dec 8, 2016 · 6 comments
Assignees
Labels
Issue-Enhancement A feature request (enhancement).
Milestone

Comments

@rkeithhill
Copy link
Contributor

rkeithhill commented Dec 8, 2016

See microsoft/vscode#16937 for details.

@rkeithhill rkeithhill changed the title Add debug configuration attrs to package.json to light up Add debug configuration attrs to package.json to light up "Add Configuration" experience Dec 8, 2016
@rkeithhill rkeithhill self-assigned this Dec 8, 2016
@rkeithhill rkeithhill added the Issue-Enhancement A feature request (enhancement). label Dec 8, 2016
@rkeithhill rkeithhill added this to the 0.8.0 milestone Dec 8, 2016
@rkeithhill rkeithhill changed the title Add debug configuration attrs to package.json to light up "Add Configuration" experience Add debug configurationSnippets to package.json to light up "Add Configuration" experience Dec 10, 2016
@rkeithhill
Copy link
Contributor Author

What do you think about this impl of the debug configurationSnippets:

image

This is what the Start Debugging target drop down looks like. Note that I want to rename the current target PowerShell to PowerShell Launch (current file). This will allow the user to use the Add Configuration button in VSCode 1.8 to add new configurations that launch specific scripts. The user can then switch between the various targets in the Debug view drop down.

image

By renaming to PowerShell Launch ... this makes room for an eventual PowerShell Attach. :-)

Thoughts? I'd like to get this in for 0.8.0. I need to test this in VSCode 1.7 but @isidorn says 1.7 should just ignore the new configurationSnippets section.

@rkeithhill
Copy link
Contributor Author

Been playing with this. I like it! It is not uncommon to have different scripts with a workspace that you want launched for debugging. This feature allows you to do that:

image

rkeithhill added a commit to rkeithhill/vscode-powershell that referenced this issue Dec 11, 2016
Rename debug target from "PowerShell" to "PowerShell Launch (current file)" this makes room for an eventual "PowerShell Attach" debug target.

Fix PowerShell#364.
@daviwil
Copy link
Contributor

daviwil commented Dec 11, 2016

I like the config naming a lot, makes things really clear. I think we'll get attach to process going pretty soon so it's good to leave room for that, as you have. Also good to be consistent with other extensions.

Hmmm, seems they're running a little late on 1.8, but maybe they'll ship soon after we do and it won't matter. I guess the biggest issue is whether there will be a way to create a default PowerShell launch config in that window of time. If it won't be possible then maybe we should either delay the release or hold off on the change until January. What do you think?

@rkeithhill
Copy link
Contributor Author

I tried the extension in VSCode 1.7 and was able to create a launch.json file from the Debug view. The only differences are that the configuration name is the updated name and instead of "program" it uses "script". That should work just fine for a person using the launch.json file on the same machine they upgraded to 0.8.0. However if that get's checked in and someone else clones it and tries to debug from a machine with <= 0.7.2 they will get an error. Easy solution though - they upgrade to 0.8.0.

rkeithhill added a commit that referenced this issue Dec 11, 2016
* Add support for debug configurationSnippets.

Rename debug target from "PowerShell" to "PowerShell Launch (current file)" this makes room for an eventual "PowerShell Attach" debug target.

Fix #364.

* Replace tabs with spaces in copy/pasted config.
@isidorn
Copy link
Contributor

isidorn commented Dec 12, 2016

@rkeithhill looks great!

@rkeithhill
Copy link
Contributor Author

@isidorn Thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

3 participants