简体   繁体   中英

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

I'm using Visual Studio Code to debug a Powershell script. I have a Hashtable object called $SCRIPT:studentInfo. When I add a Watch for this Hashtable in the Debugger, I find that the Watch doesn't display any useful information. Variable Watch 只显示对象类型,不显示内容。

Is there any efficient method to get useful information about the entire contents of a Hashtable while I am debugging?

Thank you.

Question was answered by Daniel in the comments: Remove the SCRIPT scope qualifier (ie. watch '$studentInfo' instead of '$SCRIPT:studentInfo') and the Watch displays contents of the Hashtable as expected.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM