Skip to content
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

Enable single-file (no workspace) debugging experience #359

Closed
daviwil opened this issue Dec 6, 2016 · 5 comments
Closed

Enable single-file (no workspace) debugging experience #359

daviwil opened this issue Dec 6, 2016 · 5 comments
Labels
Issue-Enhancement A feature request (enhancement).
Milestone

Comments

@daviwil
Copy link
Contributor

daviwil commented Dec 6, 2016

One important part of the PowerShell ISE workflow that needs to be replicated in VS Code is opening the editor, typing in some PowerShell script, setting a breakpoint, then running the code. Currently VS Code requires you to open a folder to define a workspace where a launch.json file can be found. This limitation will have to be removed before we will be able to provide this experience.

The VS Code limitation is being tracked here: microsoft/vscode#285

@daviwil daviwil added the Issue-Enhancement A feature request (enhancement). label Dec 6, 2016
@daviwil daviwil added this to the 0.10.0 milestone Dec 6, 2016
@rkeithhill
Copy link
Contributor

Minor clarification on ISE behavior. ISE will not allow you to set a breakpoint until you save the script to file.

@daviwil
Copy link
Contributor Author

daviwil commented Dec 7, 2016

True! Good point.

@dragonwolf83
Copy link

Please allow it to set a breakpoint without saving a file! That is probably my top annoyance in using ISE.

My main use case is that I'm often creating concept scripts to try out ideas that I don't want to save yet. I use the Editor instead of the Terminal to script because I can read it, structure it, and can go back to run individual lines. The debugger would help a lot to figure out why a concept or script is not working so that I can fix it

@daviwil
Copy link
Contributor Author

daviwil commented Jan 20, 2017

@dragonwolf83 unfortunately this just isn't possible right now because the PowerShell debugger does not allow it. We are using the Set-PSBreakpoint command to set breakpoints in the runspace. As you can see from the documentation, there's no way to set a line breakpoint without a script path. This may change in the future, though.

@daviwil daviwil modified the milestones: 0.9.0, 0.11.0 Jan 20, 2017
@daviwil
Copy link
Contributor Author

daviwil commented Jan 20, 2017

Closing this issue because it is now supported in v0.9.0 and the upcoming VS Code 1.9.0!

@daviwil daviwil closed this as completed Jan 20, 2017
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