fix step into native fn

This commit is contained in:
Dmitry Vasilev
2023-12-04 17:18:12 +08:00
parent aec570c197
commit eb6b51f601
2 changed files with 25 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ import {
initial_calltree_node, default_expand_path, toggle_expanded, active_frame,
find_call, set_active_calltree_node,
set_cursor_position, current_cursor_position, set_location,
is_native_fn,
} from './calltree.js'
const collect_logs = (logs, call) => {
@@ -344,6 +345,17 @@ const step_into = (state, index) => {
active_frame(state),
index
)
if(is_native_fn(calltree_node)) {
return {
state,
effects: {
type: 'set_status',
args: ['Cannot step into: function is either builtin or from external lib']
}
}
}
if(!ok){
return {state, effects: {type: 'set_status', args: [message]}}
} else {