Interactive debugging is here!
This upgrades Multicode.app to be a time travel debugger. This means that you can write and debug code (like you would normally), as well as go back in time to see how a certain point was reached, and optionally modify your code while debugging. No need to stop and restart the debugging process in order to make changes. Just modify your code while debugging and let the debugger sync the changes for you, without leaving the debug-experience.
Take for example the following piece of Python code:
transform = lambda v, f : f(v)
times = lambda v : v * 2
value = transform(10, times)
This piece of code has a
transform lambda that takes as arguments a value
v and a function
f. For the
value we'll transform the value
10 by applying the
times lambda. This will essentially double our value, because of the
v * 2. Let's say we're debugging our code and instead we'd want to know what happens if we did
v * 4 or
v * 10 for example.
Interactive debugging with these modifications are shown here:
When debugging normally you'll see highlights in blue and green, where blue is the current debug line and green is a "parent" debug line, like a function or if-statement that has been stepped into. When "freezing" the debugger the debug lines will be grayed out, allowing you to modify the code, sync the debugger and continue debugging.
All programming languages supported by Multicode (Python, C#, JS/TS & Bash) are available for interactive debugging as well. You can start editing the code straight away while debugging, or press the
Escape key to "freeze" the debugger manually. You'll then be able to make edits and press the
Sync button in the toolbar (or press
ctrl+enter) to trigger the syncing of your code.
We hope this will aid you in getting a better understanding of the code and that it will increase the speed you'll be able to debug!