Since I was not quite understanding how stepping out of a function works while exploring HLS, I decided to try hdb on a simpler use case, this snake game of mine (cabal run should be enough to run it, keys are hjkl to move and q to quit).
The screencast (with VSCode, hoping to please you) is available here. The main observations are as follows:
- there's a breakpoint on a call to
tryTakeMVar which is hit the first time and never again, even if that function is being called at every iteration of the game loop;
- there's another breakpoint that is being correctly hit everytime, but after I disable it, continue execution, and re-enable it, it's not hit again;
- the latter breakpoint, as soon as the debugger starts, is not being shown on its own line, but on the line of the former breakpoint. (In the video I think I say this does not happen with Vimspector, but I'm mistaken, it does happen.)
Not shown in the screencast:
- when the update loop is running freely, hitting pause (F6) has no effect.
Since I was not quite understanding how stepping out of a function works while exploring HLS, I decided to try hdb on a simpler use case, this snake game of mine (
cabal runshould be enough to run it, keys arehjklto move andqto quit).The screencast (with VSCode, hoping to please you) is available here. The main observations are as follows:
tryTakeMVarwhich is hit the first time and never again, even if that function is being called at every iteration of the game loop;Not shown in the screencast: