-
Notifications
You must be signed in to change notification settings - Fork 683
Add delete all breakpoints feature to debugger (javascript) #1628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
JerryScript-DCO-1.0-Signed-off-by: Levente Orban [email protected]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
appendLog("No active breakpoints.") | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this form would be better, whats your opinion?
activeBreakpoints.length != 0 ? activeBreakpoints.splice(0) : appendLog("No active breakpoints.")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't use splice() function in the activeBreakpoints object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's my bad, I thought that activeBreakpoints is an array.
if (!found) | ||
{ | ||
appendLog("No active breakpoints.") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there an easier way to check whether activeBreakpoints is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check with Object.keys(acviteBreakpoints).length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is more complicated. Keep the bool then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Now you can able to use
delete all
command, to clear the breakpoints from the whole project.JerryScript-DCO-1.0-Signed-off-by: Levente Orban [email protected]