Skip to content

Bug in my Vscode #5125

@abdelrahmamoh2007-ctrl

Description

@abdelrahmamoh2007-ctrl

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Screenshot

Image

Environment data

PS Version: 5.1.19041.6456
PS HostName: ConsoleHost
PSReadLine Version: 2.0.0-beta2
PSReadLine EditMode: Windows
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 3000

Steps to reproduce

#include
using namespace std;
class Box{
public:
int Number=60;
};
int main(){
Box box1;
Box* ptr=&box1;

cout<<" Using Object to Access the Number : "<<box1.Number<<"\n";

cout<<" Using Pointer to Access the Number : "<<(*ptr).Number<<"\n";

return 0;

}

Expected behavior

PS C:\Users\Administrator\Documents\Project>
PS C:\Users\Administrator\Documents\Project> & 'c:\Users\Administrator.vscode\extensions\ms-vscode.cpptools-1.31.4-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-wpyzbwuh.qyq' '--stdout=Microsoft-MIEngine-Out-onyikivc.q0t' '--stderr=Microsoft-MIEngine-Error-miemrwdb.fmp' '--pid=Microsoft-MIEngine-Pid-y2ujtjr4.ic0' '--dbgExe=C:\msys64\mingw64\bin\gdb.exe' '--interpreter=mi'
Using Object to Access the Number : 60
Using Pointer to Access the Number : 60
PS C:\Users\Administrator\Documents\Project>

Actual behavior

Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new

Last 100 Keys:
Space & Space ' c : \ U s e r s \ A d m i n
i s t r a t o r \ . v s c o d e \ e x t e n s i o n s \ m s - v s c o d e . c p p t o o l
s - 1 . 3 1 . 4 - w i n 3 2 - x 6 4 \ d e b u g A d a p t e r s \ b i n \

Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and leension.
Parameter name: left
Actual value was -2.
at Microsoft.PowerShell.Internal.VirtualTer2 value)
at Microsoft.PowerShell.PSConsoleReadLine.RallyRender(RenderData rtColor)
enderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.FrceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Isert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SlfInsert(Nullable1 key , Object arg) at Microsoft.PowerShell.PSConsoleReadLine.PocessOneKey(ConsoleKeyIneIntrinsics) nfo key, Dictionary2 dispatchTable, Boolean inoreIfNoAction, Object
arg)
at Microsoft.PowerShell.PSConsoleReadLine.IputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.RadLine(Runspace runspacwe' '--pid=Microsoft-MIe, EngineIntrinsics engineIntrinsics)
---------------------------------------------------------------------s the Number : 60

PS C:\Users\Administrator\Documents\Projec> &'c:\Users\Administratorexe' '--stdin=Microsoft.vscode\extensions\ms-vscode.cpptools-1.31.4-in32-x64\debugAdapters\we' '--pid=Microsoft-MI at Microsoft.PowerShell.PSConsoleReadLine.Isert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SlfInsert(Nullable1 kofvscode.cpptools-1.31.4-ey, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.PocessOneKey(ConsoleKes64\mingw64\bin\gdb.exe' yInfo key, Dictionary2 dispatchTable, BooleanignoreIfNoAction, Objss the Number : 60
ect arg)
at Microsoft.PowerShell.PSConsoleReadLine.IputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.RadLine(Runspace runsps
ace, EngineIntrinsics engineIntrinsics)
-------------------------------------------------------------------oft-MIEngine-Out-rp1mxaxo---
PS C:\Users\Administrator\Documents\Projec> &'c:\Users\Administratc.
or.vscode\extensions\ms-vscode.cpptools-1.31.-win32-x64\debugAdapt
ers\bin\WindowsDebugLauncher.exe' '--stdin=Micosoft-MIEngine-In-gmeator\Documents\Project> 3tscy.xic' '--stdout=Microsoft-MIEngine-Out-rp at Microsoft.PowerShell.PSConsoleReadLine.Isert(Char c) -Error-kyckdzqm.gwe' '--pid= at Microsoft.PowerShell.PSConsoleReadLine.SlfInsert(NullabledbgExe=C:\msys64\mingw64\bin1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.PocessOneKey(Consolccess the Number : 60 eKeyInfo key, Dictionary2 dispatchTable, Boolan ignoreIfNoActiostrator\Documents\Project> &
n, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.IputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.RadLine(Runspace rugme
nspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------Error-kyckdzqm.gwe' '--pid=------
PS C:\Users\Administrator\Documents\Projec> &'c:\Users\Administret
rator.vscode\extensions\ms-vscode.cpptools-1.1.4-win32-x64\debustrator\Documents\Project>
gAdapters\bin\WindowsDebugLauncher.exe' '--stdn=Microsoft-MIEngitra
ne-In-gme3tscy.xic' '--stdout=Microsoft-MIEngi at Microsoft.PowerShell.PSConsoleReadLine.Isert(Char c) osoft-MIEngine-Error-kyckdzqm. at Microsoft.PowerShell.PSConsoleReadLine.SlfInsert(Nullablmsgx3qdc.5iw' '--dbgExe=C:\msye1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.PocessOneKey(Cons Access the Number : 60 oleKeyInfo key, Dictionary2 dispatchTable, Bolean ignoreIfNoAnistrator\Documents\Project> &
ction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.IputLoop() buAccess the Number : 60
at Microsoft.PowerShell.PSConsoleReadLine.RadLine(Runspace gi
runspace, EngineIntrinsics engineIntrinsics)
--------------------------------------------------------------osoft-MIEngine-Error-kyckdzqm.--------
PS C:\Users\Administrator\Documents\Projec> &'c:\Users\Adminidb
strator.vscode\extensions\ms-vscode.cpptools-.31.4-win32-x64\nistrator\Documents\Project>
debugAdapters\bin\WindowsDebugLauncher.exe' '-stdin=Microsoft-is
MIEngine-In-gme3tscy.xic' '--stdout=Microsoft- at Microsoft.PowerShell.PSConsoleReadLine.Isert(Char c) tderr=Microsoft-MIEngine-Error-k at Microsoft.PowerShell.PSConsoleReadLine.SlfInsert(NullaIEngine-Pid-msgx3qdc.5iw' '--dbgble1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.PocessOneKey(Coto Access the Number : 60 nsoleKeyInfo key, Dictionary2 dispatchTable, oolean ignoreIministrator\Documents\Project> &
fNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.IputLoop() 4\o Access the Number : 60
at Microsoft.PowerShell.PSConsoleReadLine.RadLine(Runspact-
e runspace, EngineIntrinsics engineIntrinsics)
------------------------------------------------------------tderr=Microsoft-MIEngine-Error-k----------
PS C:\Users\Administrator\Documents\Projec> &'c:\Users\Admiin
nistrator.vscode\extensions\ms-vscode.cpptool-1.31.4-win32-ministrator\Documents\Project>
x64\debugAdapters\bin\WindowsDebugLauncher.exe '--stdin=Micrin
osoft-MIEngine-In-gme3tscy.xic' '--stdout=Micrsoft-MIEngine-64
Out-rp1mxaxo.frm' '--stderr=Microsoft-MIEngineError-kyckdzqmft
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(Cny
ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ign oreIfNoAction, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.InputLoop() dministrator\Documents\Project> & at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspcode\extensions\ms-vscode.cpptoolace runspace, EngineIntrinsics engineIntrinsics) -----------------------------------------------------------e-In-gme3tscy.xic' '--stdout=Micr------------ PS C:\Users\Administrator\Documents\Projec> & 'c:\Users\Adm ministrator\.vscode\extensions\ms-vscode.cpptools-1.31.4-wiC n32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdi n=Microsoft-MIEngine-In-gme3tscy.xic' '--stdout=Microsoft-Mdministrator\Documents\Project> IEngine-Out-rp1mxaxo.frm' '--stderr=Microsoft-MIEngine-Erroscode\extensions\ms-vscode.cpptoor-kyckdzqm.gwe' '--pid=Microsoft-MIEngine-Pid-msgx3qdc.5iw'pters\bin\WindowsDebugLauncher.ex '--dbgExe=C:\msys64\mingw64\bin\gdb.exe' '--iey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boole
an ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()s\Administrator\Documents\Project> &

at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Ru-wi
nspace runspace, EngineIntrinsics engineIntrinsics) tdir to Access the Number : 60
--------------------------------------------------------t-M

PS C:\Users\Administrator\Documents\Projec> & 'c:\Users.gwe' '--pid=Microsoft-MIEngine-Pid-\Administrator.vscode\extensions\ms-vscode.cpptools-1.3=C:\msys64\mingw64\bin\gdb.exe' '--i1.4-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe
' '--stdin=Microsoft-MIEngine-In-gme3tscy.xic' '--stdouts\Administrator\Documents\Project>
=Microsoft-MIEngine-Out-rp1mxaxo.frm' '--stderr=Microsofor.vscode\extensions\ms-vscode.cpptt-MIEngine-Error-kyckdzqm.gwe' '--pid=Microsoft-MIEngineebugAdapters\bin\WindowsDebugLaunche-Pid-msgx3qdc.5iw' '--dbgExe=C:\msys64\mingw64 at Microsoft.PowerShell.PSConsoleReadLine.ReadL'--interpreter=mi'
ine(Runspace runspace, EngineIntrinsics engineIntrng Pointer to Access the Number : 60
insics)
--------------------------------------------------inistrator.vscode\extensions\ms-vscode.cp---------------------
PS C:\Users\Administrator\Documents\Projec> & 'c:er.exeect to Access the Number : 60
\Users\Administrator.vscode\extensions\ms-vscode.stdouts\Administrator\Documents\Project>
cpptools-1.31.4-win32-x64\debugAdapters\bin\Windowcrosof
sDebugLauncher.exe' '--stdin=Microsoft-MIEngine-InEngine
-gme3tscy.xic' '--stdout=Microsoft-MIEngine-Out-rp\gdb.e
1mxaxo.frm' '--stderr=Microsoft-MIEngine-Error-kyc:\Users\Administrator\Documents\Project>
kdzqm.gwe' '--pid=Microsoft-MIEngine-Pid-msgx3qdc.:\User
5iw' '--dbgExe=C:\msys64\mingw64\bin\gdb.exe' '--iols-1.
nterpreter=mi'
Using Object to Access the Number : 60
Using Pointer to Access the Number : 60
PS C:\Users\Administrator\Documents\Project> & 'c:crosoft-MIEngine-Out-onyikivc.q0t' '--stde at Microsoft.PowerShell.PSConsoleReadLine.Rede.IEngine-Error-miemrwdb.fmp' '--pid=MicrosoadLine(Runspace runspace, EngineIntrinsics engidowd-y2ujtjr4.ic0' '--dbgExe=C:\msys64\mingw6neIntrinsics)
-----------------------------------------------gme3tscy.xic' '--stdout=Microsoft-MIEngine-Ou------------------------
PS C:\Users\Administrator\Documents\Projec> & kyc
'c:\Users\Administrator.vscode\extensions\ms-vdc.
scode.cpptools-1.31.4-win32-x64\debugAdapters\b--i
in\WindowsDebugLauncher.exe' '--stdin=MicrosoftS C:\Users\Administrator\Documents\Project>
-MIEngine-In-gme3tscy.xic' '--stdout=Microsoft-S C:\Users\Administrator\Documents\Project>
MIEngine-Out-rp1mxaxo.frm' '--stderr=Microsoft-\Users\Administrator.vscode\extensions\ms-vsMIEngine-Error-kyckdzqm.gwe' '--pid=Microsoft-Mcpptools-1.31.4-win32-x64\debugAdapters\bin\WIEngine-Pid-msgx3qdc.5iw' '--dbgExe=C:\msys64\msDebugLauncher.exe' '--stdin=Microsoft-MIEngiingw64\bin\gdb.exe' '--interpreter=mi'
Using Object to Access the Number : 60 t-o
Using Pointer to Access the Number : 60 -mi
PS C:\Users\Administrator\Documents\Project> & jr4
'c:\Users\Administrator.vscode\extensions\ms-v'--
scode.cpptools-1.31.4-win32-x64\debugAdapters\bUsing Object to Access the Number : 60
icrosoft-MIEngine-Error-kyckdzqm.gwe' '--pid=Microsoft-MIEngine-Pid-msgx3qdc.5iw' '--dbgExe=C:\msys64\mingw64\bin\gdb.exe' '--interpreter=mi'
Using Object to Access the Number : 60
Using Pointer to Access the Number : 60
PS C:\Users\Administrator\Documents\Project> & 'c:\Users\Administrator.vscode\extensions\ms-vscode.cpptools-1.31.4-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-gme3tscy.xic' '--stdout=Microsoft-MIEngine-Out-rp1mxaxo.frm' '--stderr=Microsoft-MIEngine-Error-kyckdzqm.gwe' '--pid=Microsoft-MIEngine-Pid-msgx3qdc.5iw' '--dbgExe=C:\msys64\mingw64\bin\gdb.exe'
'--interpreter=mi' ^C
PS C:\Users\Administrator\Documents\Project>
PS C:\Users\Administrator\Documents\Project> & 'c:\Users\Administrator.vscode\extensions\ms-vscode.cpptools-1.31.4-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-wpyzbwuh.qyq' '--stdout=Microsoft-MIEngine-Out-onyikivc.q0t' '--stderr=Microsoft-MIEngine-Error-miemrwdb.fmp' '--pid=Microsoft-MIEngine-Pid-y2ujtjr4.ic0' '--dbgExe=C:\msys64\mingw64\bin\gdb.exe' '--interpreter=mi'
Using Object to Access the Number : 60
Using Pointer to Access the Number : 60
PS C:\Users\Administrator\Documents\Project>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions