-
Notifications
You must be signed in to change notification settings - Fork 511
Hitting a breakpoint in the console while not debugging should activate the VS Code debugger #619
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
Comments
Will this also work with breakpoints set from the editor? |
That one is tricky because VS Code's debugger model doesn't give me information about breakpoints until the user starts the debugger. I've asked them about this already but we haven't come to a viable solution yet. It's the last step in making a 100% compatible debugging experience between VS Code and the ISE, so I definitely want to get it working! |
This change is part of the fix for PowerShell/vscode-powershell#619 which states that hitting a breakpoint in the integrated console does not activate the debugger in VS Code. The fix is to check whether a debugger client is connected when a breakpoint is hit, and if not, send a notification through the language server to have the editor connect its debugger client.
This change adds new behavior which causes VS Code's debugger UI to be activated when a breakpoint is hit in the Integrated Console while not currently in debug mode. This allows the user to set breakpoints and run scripts from the console while still leveraging VS Code's rich debugging UI. Resolves PowerShell#619.
This change is part of the fix for PowerShell/vscode-powershell#619 which states that hitting a breakpoint in the integrated console does not activate the debugger in VS Code. The fix is to check whether a debugger client is connected when a breakpoint is hit, and if not, send a notification through the language server to have the editor connect its debugger client.
This change adds new behavior which causes VS Code's debugger UI to be activated when a breakpoint is hit in the Integrated Console while not currently in debug mode. This allows the user to set breakpoints and run scripts from the console while still leveraging VS Code's rich debugging UI. Resolves #619.
It doesn't work for me (or I'm failing to understand how it's supposed to work). Steps to Reproduce:
function Get-Answer {
42
}
Import-Module -Path .\Answer.psm1
Get-Answer
I've also tried sourcing Details
|
I'm using the below combination and it seems that the above feature (launching from Integrated Console expecting breakpoint to be hit) only works if you manually start then stop the debugger (by hitting F5) for at least once. Is it by design or am I missing some options?
|
@changbowen you are not missing anything--that is a limitation of this debugging experience today where you must hit F5 at least once |
Desired behavior:
Set-PSBreakpoint -Script <script> -Line <##>
This should also work for command and variable breakpoints.
The text was updated successfully, but these errors were encountered: