簡體   English   中英

Powershell 在 Visual Studio Code 中調試:Watch for Hashtable 不顯示有用信息

[英]Powershell debugging in Visual Studio Code: Watch for Hashtable does not show useful info

我正在使用 Visual Studio Code 調試 Powershell 腳本。 我有一個名為 $SCRIPT:studentInfo 的哈希表 object。 當我在 Debugger 中為這個 Hashtable 添加一個 Watch 時,我發現該 Watch 沒有顯示任何有用的信息。 Variable Watch 只顯示對象類型,不顯示內容。

在調試時是否有任何有效的方法來獲取有關哈希表全部內容的有用信息?

謝謝你。

Daniel 在評論中回答了這個問題:刪除 SCRIPT scope 限定符(即 watch '$studentInfo' 而不是 '$SCRIPT:studentInfo'),Watch 會按預期顯示 Hashtable 的內容。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM