PowerShell Studio freezing/behaving oddly in debugger

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
jthornton@reflectsystems.com
Posts: 8
Last visit: Mon Apr 01, 2019 6:12 am

PowerShell Studio freezing/behaving oddly in debugger

Post by jthornton@reflectsystems.com »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2017 v5.4.145
32 or 64 bit version of product: 64-bit
Operating system: Windows 10 v1709
32 or 64 bit OS: 64-bit

*** Please add details and screenshots as needed below. ***

Hi!
I have a project which seems to cause the debugger to hang, lose track of the presence and location of breakpoints, and to return null for any statement entered into the debug console. The most notable fact about this project is that I am handling a 1MB byte array; passing that array to functions seems to cause some serious weirdness, even if I pass it by reference.

To reproduce the issue, place a breakpoint in TestClient.ps1, line 329, and step forward. Here's the code from this function ($Bytes is the 1MB byte array):

Code: Select all

function SHA1_Bytes
{
	param
	(
		[ref]$Bytes
	)
	
	$SHA1Provider = new-object -TypeName System.Security.Cryptography.SHA1Cng
	
	$SHA1Hash = [System.BitConverter]::ToString($SHA1Provider.ComputeHash($Bytes.Value))
	$SHA1Hash = $SHA1Hash.ToLower() -replace '-', ''
	
	return $SHA1Hash
}
Technically, the hang isn't really a hang - if I wait multiple minutes, it will eventually proceed.
This issue does not occur if I debug the project in PowerShell ISE.
I've attached the project to this message.
Attachments
connection-test.zip
(141.36 KiB) Downloaded 96 times
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: PowerShell Studio freezing/behaving oddly in debugger

Post by davidc »

I suspect it is triggered by a hover over the variable. We will investigate and see what we can do about this.
David
SAPIEN Technologies, Inc.
This topic is 6 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.