File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -849,27 +849,25 @@ def process_protocol_result args
849849 unless s_id = @scr_id_map [ path ]
850850 s_id = ( @scr_id_map . size + 1 ) . to_s
851851 @scr_id_map [ path ] = s_id
852+ lineno = 0
853+ src = ''
852854 if path && File . exist? ( path )
853855 src = File . read ( path )
856+ @src_map [ s_id ] = src
857+ lineno = src . lines . count
854858 end
855- @src_map [ s_id ] = src
856- end
857- if src = @src_map [ s_id ]
858- lineno = src . lines . count
859- else
860- lineno = 0
861- end
862- frame [ :location ] [ :scriptId ] = s_id
863- frame [ :functionLocation ] [ :scriptId ] = s_id
864- @ui . fire_event 'Debugger.scriptParsed' ,
859+ @ui . fire_event 'Debugger.scriptParsed' ,
865860 scriptId : s_id ,
866- url : frame [ :url ] ,
861+ url : path ,
867862 startLine : 0 ,
868863 startColumn : 0 ,
869864 endLine : lineno ,
870865 endColumn : 0 ,
871866 executionContextId : 1 ,
872867 hash : src . hash . inspect
868+ end
869+ frame [ :location ] [ :scriptId ] = s_id
870+ frame [ :functionLocation ] [ :scriptId ] = s_id
873871
874872 frame [ :scopeChain ] . each { |s |
875873 oid = s . dig ( :object , :objectId )
You can’t perform that action at this time.
0 commit comments