Skip to content
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

Improve hit condition debugging logic #98

Open
TwitchBronBron opened this issue Aug 17, 2022 · 1 comment
Open

Improve hit condition debugging logic #98

TwitchBronBron opened this issue Aug 17, 2022 · 1 comment

Comments

@TwitchBronBron
Copy link
Member

Node-debug supports many different hit conditions (see this link for more info).

Currently the debug protocol only supports a single variation (when this breakpoint has been hit x times, then stop every time after). If the debug protocol won't implement all the other variations, then we could abuse the new conditional breakpoints to leverage our own hit count, by adding an expression like this. Consider the hit condition % 5

(function(): try : m.hitCount_abcdef++ : catch e : m.hitCount_abcdef= 1 : end try : return hitCount_abcdef mod 5 = 0 : end function)()
@TwitchBronBron
Copy link
Member Author

I'm not sure why we needed to jump through all these hoops. I just re-tested, and it seems that multi-line expressions are supported natively.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant