Skip to content

Break point 'breaks debugging' when disabled during execution #1166

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

Open
MiYanni opened this issue Jan 17, 2018 · 3 comments
Open

Break point 'breaks debugging' when disabled during execution #1166

MiYanni opened this issue Jan 17, 2018 · 3 comments
Labels

Comments

@MiYanni
Copy link

MiYanni commented Jan 17, 2018

System Details

  • Operating system name and version: Windows 10
  • VS Code version: 1.19.1
  • PowerShell extension version: 1.5.1
  • Output from $PSVersionTable:
Major  Minor  Build  Revision
-----  -----  -----  --------
1      5      1      0

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

Issue Description

While running a script, I remove a breakpoint. It seems that, sometimes, the debugger doesn't realize that breakpoint was removed. Steps and behavior:

  1. Remove a breakpoint during a debug session while code is executing/running. (Note: Should be a breakpoint you would encounter past current execution)
  2. Execution stops where the breakpoint used to be. Debugger buttons change to the 'stopped at breakpoint' state. Verbose logging shows "Hit Line Breakpoint on '######:###'" showing the line number where the breakpoint used to be. The integrated terminal allows input and shows the "[DBG]: [DBG]: " prefix before the input line.
  3. At this point, trying to hit the Play button or F5 does nothing. Execution cannot resume.
  4. If you hit the Stop button, the debugger UI is removed. However, the integrated console is still stuck in the debug state ("[DBG]: [DBG]: " prefix).
  5. Using any options in the Debug menu (in the menu bar for VSCode) does nothing. F5 does nothing. You can no longer debug or get out of this 'zombie' debug state. The only option is kill the integrated terminal (or restart VSCode) to allow debugging again.

Additional note: The code this most frequently happens on is a polling process with Start-Sleep in it. I'd recommend just making a loop with a 5 to 10 second sleep between each iteration. Then, try to remove a breakpoint outside (beyond) the loop.

Attached Logs

Let me know if you need logs for this.

@SydneyhSmith
Copy link
Collaborator

@MiYanni I am going through old issues and am wondering if you are still running into this problem with the latest version of the extension, thanks!

@MiYanni
Copy link
Author

MiYanni commented Jan 7, 2019

@SydneyhSmith Even though I'm on the Azure PowerShell team... I uninstalled the extension about a half a year ago. I was running into too many issues at that time (the primary one was the pane resize causing the line output to be un-readable/mangled).

Now, we've moved Azure PowerShell to PowerShell Core (6). Does this extension support PowerShell Core? If not, I probably don't have any use of re-installing it at this time. We'd definitely like to work with the team for this extension, though. We have some suggestions/ideas that would help move more customers off of PowerShell ISE. You can email me or azdevxps (team alias) if you'd like to work together.

@SydneyhSmith
Copy link
Collaborator

@MiYanni thanks for your quick reply! Yep, the extension supports Core, that is a big reason why we are trying to help users move from the ISE to VScode (so they can also move to PS Core), I will connect with you via email for more feedback.

@rjmholt rjmholt mentioned this issue Aug 24, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants