From 58a1c05465d51d7369363e0c4d309fab5934333e Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Tue, 8 Jun 2021 22:25:24 +0100 Subject: [PATCH] Ask user for how many bytes to read --- python3/vimspector/debug_session.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python3/vimspector/debug_session.py b/python3/vimspector/debug_session.py index c0ddafa..31dc165 100644 --- a/python3/vimspector/debug_session.py +++ b/python3/vimspector/debug_session.py @@ -543,13 +543,16 @@ class DebugSession( object ): return memoryReference = self._variablesView.GetMemoryReference( buf, line_num ) - length = 1024 # TODO: WHat? - if memoryReference is None: utils.UserMessage( "Cannot find memory reference for that", error = True ) return + length = utils.AskForInput( 'How much data to display? ', + default_value = '1024' ) + + if length is None: + return def handler( msg ): @@ -559,7 +562,7 @@ class DebugSession( object ): 'command': 'readMemory', 'arguments': { 'memoryReference': memoryReference, - 'count': length, + 'count': int( length ), } } )