File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
function PSConsoleHostReadLine
2
2
{
3
+ [System.Diagnostics.DebuggerHidden ()]
4
+ param ()
5
+
3
6
# # Get the execution status of the last accepted user input.
4
7
# # This needs to be done as the first thing because any script run will flush $?.
5
8
$lastRunStatus = $?
Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ internal static PSKeyInfo ReadKey()
238
238
if ( ps == null )
239
239
{
240
240
ps = System . Management . Automation . PowerShell . Create ( RunspaceMode . CurrentRunspace ) ;
241
- ps . AddScript ( "0" , useLocalScope : true ) ;
241
+ ps . AddScript ( "[System.Diagnostics.DebuggerHidden()]param() 0" , useLocalScope : true ) ;
242
242
}
243
243
244
244
// To detect output during possible event processing, see if the cursor moved
@@ -674,7 +674,7 @@ private PSConsoleReadLine()
674
674
{
675
675
try
676
676
{
677
- var results = ps . AddScript ( "$Host" , useLocalScope : true ) . Invoke < PSHost > ( ) ;
677
+ var results = ps . AddScript ( "[System.Diagnostics.DebuggerHidden()]param() $Host" , useLocalScope : true ) . Invoke < PSHost > ( ) ;
678
678
PSHost host = results . Count == 1 ? results [ 0 ] : null ;
679
679
hostName = host ? . Name ;
680
680
}
You can’t perform that action at this time.
0 commit comments