File tree 1 file changed +9
-11
lines changed
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
849
849
unless s_id = @scr_id_map [ path ]
850
850
s_id = ( @scr_id_map . size + 1 ) . to_s
851
851
@scr_id_map [ path ] = s_id
852
+ lineno = 0
853
+ src = ''
852
854
if path && File . exist? ( path )
853
855
src = File . read ( path )
856
+ @src_map [ s_id ] = src
857
+ lineno = src . lines . count
854
858
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' ,
865
860
scriptId : s_id ,
866
- url : frame [ :url ] ,
861
+ url : path ,
867
862
startLine : 0 ,
868
863
startColumn : 0 ,
869
864
endLine : lineno ,
870
865
endColumn : 0 ,
871
866
executionContextId : 1 ,
872
867
hash : src . hash . inspect
868
+ end
869
+ frame [ :location ] [ :scriptId ] = s_id
870
+ frame [ :functionLocation ] [ :scriptId ] = s_id
873
871
874
872
frame [ :scopeChain ] . each { |s |
875
873
oid = s . dig ( :object , :objectId )
You can’t perform that action at this time.
0 commit comments