Skip to content

Breakpoints don't remove from Integrated Console #981

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
mattmcnabb opened this issue Jul 31, 2017 · 3 comments
Closed

Breakpoints don't remove from Integrated Console #981

mattmcnabb opened this issue Jul 31, 2017 · 3 comments

Comments

@mattmcnabb
Copy link
Contributor

System Details

PS C:\> code -v
1.14.2
cb82febafda0c8c199b9201ad274e25d9a76874e

PS C:\> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
1      4      1      0


PS C:\> code --list-extensions --show-versions
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.15063.483
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.15063.483
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

Repro

  1. Set a breakpoint in the editor with F9 or by clicking next to the line number
  2. The breakpoint is visible in the debug pane, but not in the Integrated Console via Get-PSBreakpoint
  3. Run the debugger up to the breakpoint
  4. Now the breakpoint is returned by Get-PSBreakpoint
  5. Stop the debugger
  6. Remove the breakpoint from the editor or the debug pane
  7. The breakpoint is still returned in the Integrated Console

The breakpoint should be removed from the Integrated Console when removed from the debugger pane. This issue does not occur if I configure "powershell.debugging.createTemporaryIntegratedConsole" to "true."

1501505900-66da0c65-ddbd-4f72-b609-e10b95f6686a1501504221833.zip

@rkeithhill
Copy link
Contributor

rkeithhill commented Jul 31, 2017

This is how the VSCode debug protocol works ATM. The PS integrated console doesn't get notified of breakpoints until the debugger is started. One of the messages it sends as part of debugger startup is a setBreakpointsRequest.

There is no debugger protocol event from the debugger to vscode to clear breakpoints and in the case you specify in step #6 above - the debugger isn't running at that point anyway. That's not to say we couldn't add a PowerShell extension specific message and have the extension clear the breakpoint, assuming there is an API to do that.

cc @weinand

@mattmcnabb
Copy link
Contributor Author

@rkeithhill The first behavior where the breakpoints don't show up until the debugger has started is not necessarily a big deal, but I thought it might help illustrate the problem.

The second behavior described in step 6 kind of makes sense based on your description. Ultimately it would be great if the Integrated Console and the editor matched up on all breakpoints regardless of where they are set.

@daviwil
Copy link
Contributor

daviwil commented Aug 14, 2017

Like Keith said, this is a general issue with how VS Code's debug protocol works. I'm tracking a possible solution with issue #625, will close this one in favor of that.

@daviwil daviwil closed this as completed Aug 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants