Vscode-powershell: Callstack not focusing on correct element

Created on 19 Mar 2019  路  2Comments  路  Source: PowerShell/vscode-powershell

Callstack not focusing on correct element

Version: 1.32.3 (system setup)
Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4
Date: 2019-03-14T23:43:35.476Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763

When using Powershell, some scenarios make the callstack not work properly.

Here's one example of that behavior.

To reproduce, clone [ https://github.com/itfranck/vscode-powershell-callstack-bug](
then open the following files in the editor:

  • debug.ps1
  • 1\debug.ps1
  • test-bug\test.psm1

Place a breakpoint in the begin and process block of test.psm1

Test1.psm1

Go in 1\debug.ps1, then start a debug session.

Debug1_0

The expected behavior is that test.ps1 should be focused.
However, debug.ps1 remains in focus. The callstack also show the top frame not emphasized as it should be.

Furthermore, every subsequent continue (F10) or step-in (F11) put focus back to the second callstack frame (debug.ps1) instead of staying into test.psm1.

Debug1_1

Debugging debug.ps1 (not in 1 subfolder) works fine.

Debug2_0

Debug2_1

This was tested on Windows 10 and Windows 2016 using the latest version, both with Powershell and Powershell Preview extensions, as much with code and code insiders.

edit:
I am unsure but it might or might not be relevant with #1783 . That being said, the current behavior make it a pain to debug modules as the proper step is not focusing.

Area-Debugging Issue-Bug

Most helpful comment

Dupe of #1750 A fix is coming to the PowerShell extension. Hopefully it will be released next week. There's a chance we will have a preview version with this fix if folks want to try it out before then.

All 2 comments

I can confirm this issue with VS Code version Version: 1.32.3, as well as the current insider builds of VS Code. This issue makes step-by-step debugging impossible when working with modules.

Dupe of #1750 A fix is coming to the PowerShell extension. Hopefully it will be released next week. There's a chance we will have a preview version with this fix if folks want to try it out before then.

Was this page helpful?
0 / 5 - 0 ratings