Debugging session does not end, even after selecting "Stop Debugging"
See original GitHub issueSystem Details
- Operating system name and version: Windows 10 Creator (15063.540)
- VS Code version: 1.15.1
- PowerShell extension version: 1.4.1
- Output from
$PSVersionTable
:
Name Value
PSVersion 5.1.15063.502 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} BuildVersion 10.0.15063.502 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
Copy / paste the following commands into the PowerShell Integrated Console, and paste the output here:
code -v
1.15.1
41abd21afdf7424c89319ee7cb0445cc6f376959
$pseditor.EditorServicesVersion
Major Minor Build Revision
----- ----- ----- --------
1 4 1 0
code --list-extensions --show-versions
ms-vscode.PowerShell@1.4.1
$PSVersionTable
See above
Issue Description
I am experiencing a problem with… ending a debugging session. I do the following steps (assuming a powershell script is already loaded and a breakpoint has been applied):
- Go to the Debug menu and select start debugging.
- My script in this case is one large main function with many sub functions. So I call the function from the “Terminal” screen. In this case it is: . ./Get-TFSUsers.ps1
- I then pass the needed parameters to the function. I pass up to 4 parameters. An example is as follows: Get-TFSGroupMembership http://TFSEnterprise:8080/tfs/Services Plugin -WriteOnly So this is the function name, the collection URL, the Project I want to get users from and the last is a switch to tell the script to get “writeonly” users. There is a second switch which is not shown here and I have not typically used.
- So my program now executes successfully and hits the breakpoint successfully.
- I will then F11 or F10 for a while and then decide I am done debugging as I have now what I need.
- I will then go to the Debug menu and select “Stop Debugging”.
- I will then go and select from the Debug menu “Remove all breakpoints”
- The breakpoints all go away.
- I can then either decide to make some changes to the script or just decide to run the script again. Either way it does not matter. The same result occurs.
- I now execute my script again from the “Terminal” screen and even if no breakpoint now exists, it will break at the location where my old breakpoints used to be.
I have tried all sorts of things to end the debug session, but nothing ends it. I have read all the tutorials on the VS Code debugger and nothing indicates that I am doing anything wrong or missing a step (so it seems). If there is something missing I could not for the life of me find it.
Finally the only way I could get the debugging session to end was to close out of VS Code and restart it again. This terminated the debug session. Otherwise, every time I ran the script it would continue to break at the non-existent breakpoint. If I added the breakpoint back and removed it again, this did not change a thing. I showed this to a couple of other VS Code users in my company and they also thought this was a bug. I am however skeptical that it is as I would think someone for sure would have seen this by now. However I could not see any mention of it. It seems like an in your face problem that would be noticed by everyone. So I am thinking I have done something wrong. I thought I would submit it anyway and see where it goes.
Attached Logs
I am not having any errors or crashes that exhibit this problem therefore I have not included any logs based on the URL given below. If however you need me to do so, I can follow your guidance as necessary to capture any information you may need.
Follow the instructions in the README about capturing and sending logs.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (1 by maintainers)
Mine too. In fact even though you select Stop-Debugging, I noticed the [DBG] prompt never went away. Subsequent debugging entered further and futher nested prompts until breakpoints were outright ignored.
Had to type ‘q’ in the console window to exit out of all sessions
This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes.